From 762ad44ffdd30bae68fc3e30670618aeadd32182 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Fri, 9 Mar 2012 14:10:49 +0100 Subject: [PATCH] Only rmdir /lib/init/rw if it exists. --- debian/changelog | 1 + debian/systemd.postinst | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 10689cb6..a5e0633b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ systemd (43-2) UNRELEASED; urgency=low * Output "reloading systemd message" to stderr, to prevent confusing debconf. + * Only rmdir /lib/init/rw if it exists. -- Tollef Fog Heen Thu, 08 Mar 2012 15:16:10 +0100 diff --git a/debian/systemd.postinst b/debian/systemd.postinst index b6f83d54..97ff835f 100644 --- a/debian/systemd.postinst +++ b/debian/systemd.postinst @@ -51,7 +51,9 @@ if dpkg --compare-versions "$2" lt "40-1"; then # /lib/init/rw has been replaced by /run, so try to remove it on upgrades # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=643699 _systemctl stop lib-init-rw.automount lib-init-rw.mount || true - rmdir --ignore-fail-on-non-empty /lib/init/rw || true + if [ -d /lib/init/rw ]; then + rmdir --ignore-fail-on-non-empty /lib/init/rw || true + fi # Create /run/initctl → /dev/initctl compat symlink on upgrades if [ -e /sys/fs/cgroup/systemd ]; then -- 2.39.5