summaryrefslogtreecommitdiff
path: root/script/deb-systemd-helper
diff options
context:
space:
mode:
Diffstat (limited to 'script/deb-systemd-helper')
-rwxr-xr-xscript/deb-systemd-helper8
1 files changed, 4 insertions, 4 deletions
diff --git a/script/deb-systemd-helper b/script/deb-systemd-helper
index 9149d18..f6b0fe7 100755
--- a/script/deb-systemd-helper
+++ b/script/deb-systemd-helper
@@ -496,10 +496,10 @@ for my $scriptname (@ARGV) {
# subdirectories. Necessary to cleanly pass a piuparts run.
rmdir_if_empty('/var/lib/systemd/deb-systemd-helper-enabled');
- # Same with /etc/systemd, where we create symlinks. If systemd is not
- # installed (and no other package shipping service files), this would
- # make piuparts fail, too.
- rmdir_if_empty('/etc/systemd');
+ # Same with directories below /etc/systemd, where we create symlinks.
+ # If systemd is not installed (and no other package shipping service
+ # files), this would make piuparts fail, too.
+ rmdir_if_empty($_) for (grep { -d } </etc/systemd/system/*>);
}
if ($action eq 'enable') {