summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2014-02-17 20:30:58 +0100
committerMichael Stapelberg <michael@stapelberg.de>2014-02-17 20:32:59 +0100
commit84217bc0b8beb60e082d6f836c4f6dc2e8d1fa28 (patch)
tree37b213cea33133752ce004ed3402d0b3d06571b6 /script
parent13482205b92e0a755c1d08bed78538a59520eaa7 (diff)
downloadinit-system-helpers-debian/1.16.tar.gz
don’t delete /etc/systemd/, only the hierarchy below it (Thanks Andreas Beckmann)debian/1.16
This is necessary since we now ship the /etc/systemd directory, so we should not delete it.
Diffstat (limited to 'script')
-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') {