From 2b8f4caf73cab505c6f6ccfe51a96d348f7c7e37 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Sat, 11 Feb 2012 10:38:58 +0100 Subject: [PATCH] Stop installing lib-init-rw (auto)mount units and try to cleanup /lib/init/rw in postinst. Bump dependency on initscripts accordingly. Closes: #643699 --- debian/changelog | 3 +++ debian/control | 2 +- debian/lib-init-rw.automount | 15 --------------- debian/lib-init-rw.mount | 10 ---------- debian/systemd.install | 2 -- debian/systemd.postinst | 7 +++++++ 6 files changed, 11 insertions(+), 28 deletions(-) delete mode 100644 debian/lib-init-rw.automount delete mode 100644 debian/lib-init-rw.mount diff --git a/debian/changelog b/debian/changelog index 2e077aca..836f04b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -28,6 +28,9 @@ systemd (43-1) unstable; urgency=low * Avoid error messages from systemctl in postinst if systemd is not running by checking for /sys/fs/cgroup/systemd before executing systemctl. Closes: #642749 + * Stop installing lib-init-rw (auto)mount units and try to cleanup + /lib/init/rw in postinst. Bump dependency on initscripts accordingly. + Closes: #643699 -- Tollef Fog Heen Tue, 07 Feb 2012 21:36:34 +0100 diff --git a/debian/control b/debian/control index 91cd1ea8..6364f6ba 100644 --- a/debian/control +++ b/debian/control @@ -39,7 +39,7 @@ Section: admin Priority: extra Recommends: libpam-systemd Suggests: systemd-gui, python -Depends: ${shlibs:Depends}, ${misc:Depends}, util-linux (>= 2.19.1-2), initscripts (>= 2.88dsf-13.3), udev +Depends: ${shlibs:Depends}, ${misc:Depends}, util-linux (>= 2.19.1-2), initscripts (>= 2.88dsf-17), udev Breaks: lvm2 (<< 2.02.84-1) Conflicts: klogd Description: system and service manager diff --git a/debian/lib-init-rw.automount b/debian/lib-init-rw.automount deleted file mode 100644 index f32a921a..00000000 --- a/debian/lib-init-rw.automount +++ /dev/null @@ -1,15 +0,0 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. - -[Unit] -Description=Debian early rw Automount Point -DefaultDependencies=no -Before=basic.target -ConditionPathIsDirectory=/lib/init/rw - -[Automount] -Where=/lib/init/rw diff --git a/debian/lib-init-rw.mount b/debian/lib-init-rw.mount deleted file mode 100644 index f3650d27..00000000 --- a/debian/lib-init-rw.mount +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Debian early rw mount -DefaultDependencies=no -ConditionPathIsDirectory=/lib/init/rw - -[Mount] -What=tmpfs -Where=/lib/init/rw -Type=tmpfs -Options=mode=0755,nosuid diff --git a/debian/systemd.install b/debian/systemd.install index 36465a1b..92256405 100644 --- a/debian/systemd.install +++ b/debian/systemd.install @@ -39,7 +39,5 @@ usr/lib/sysctl.d usr/lib/systemd usr/lib/tmpfiles.d debian/init-functions lib/lsb -debian/lib-init-rw.automount lib/systemd/system/ -debian/lib-init-rw.mount lib/systemd/system/ debian/debian-fixup lib/systemd/ debian/debian-fixup.service lib/systemd/system diff --git a/debian/systemd.postinst b/debian/systemd.postinst index 56f508a7..a0cfab0f 100644 --- a/debian/systemd.postinst +++ b/debian/systemd.postinst @@ -40,6 +40,13 @@ EOF fi fi +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 +fi + systemd-machine-id-setup dpkg-maintscript-helper rm_conffile /etc/lsb-base-logging.sh 20-1 systemd -- "$@" -- 2.39.5