summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stapelberg <stapelberg@debian.org>2013-11-06 19:09:56 +0100
committerMichael Stapelberg <michael@stapelberg.de>2013-11-06 19:09:56 +0100
commit7b937dbf841da108e81eb79278812eb5f89cff43 (patch)
tree2a65beee422dd18f1587ab956283674fde2cbb27
parent213dd8ea20f12f1bebd3a990d33c04c1ce7b59da (diff)
downloadinit-system-helpers-7b937dbf841da108e81eb79278812eb5f89cff43.tar.gz
cleanup masked state directory on unmask (for piuparts)
-rwxr-xr-xscript/deb-systemd-helper3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/deb-systemd-helper b/script/deb-systemd-helper
index 41f8ebb..0f321c3 100755
--- a/script/deb-systemd-helper
+++ b/script/deb-systemd-helper
@@ -512,6 +512,9 @@ for my $scriptname (@ARGV) {
if ($action eq 'unmask') {
unmask_service($scriptname, $service_path);
+ # Clean up the state dir if it’s empty, or at least clean up all empty
+ # subdirectories. Necessary to cleanly pass a piuparts run.
+ rmdir_if_empty('/var/lib/systemd/deb-systemd-helper-masked');
}
}