[Pkg-sysvinit-devel] Bug#674178: /dev/shm is not set up right in chroot
Serge Hallyn
serge.hallyn at canonical.com
Wed May 30 18:11:55 UTC 2012
Here is a debdiff showing the change I was suggesting. It works under
debootstrap. The !ischroot case is unchanged, as is the case under
chroot where /dev is a mounpoint.
diff -u sysvinit-2.88dsf/debian/changelog sysvinit-2.88dsf/debian/changelog
--- sysvinit-2.88dsf/debian/changelog
+++ sysvinit-2.88dsf/debian/changelog
@@ -1,3 +1,12 @@
+sysvinit (2.88dsf-13.10ubuntu12) quantal; urgency=low
+
+ * initscripts.postinst: if /dev is not a separate partition and we're in a
+ chroot, then create /run/shm and make /dev/shm a symbolic link to it, as
+ we would expect to find in a upgraded and rebooted running system.
+ (LP: #974584) (Closes: #674178)
+
+ -- Serge Hallyn <serge.hallyn at ubuntu.com> Wed, 30 May 2012 12:17:37 -0500
+
sysvinit (2.88dsf-13.10ubuntu11) precise; urgency=low
* Only try to move links in /etc/rc{0,6}.d that match "S0*". LP: #941867.
diff -u sysvinit-2.88dsf/debian/initscripts.postinst sysvinit-2.88dsf/debian/initscripts.postinst
--- sysvinit-2.88dsf/debian/initscripts.postinst
+++ sysvinit-2.88dsf/debian/initscripts.postinst
@@ -255,7 +255,12 @@
# Symlink /dev/shm from /run/shm
# Note that it's really /var/run/shm
- compat_link /dev/shm /run/shm
+ if ! mountpoint -q /dev ; then
+ [ ! -d /run/shm ] && mkdir -p /run/shm
+ [ ! -d /dev/shm ] && compat_link /run/shm /dev/shm
+ else
+ compat_link /dev/shm /run/shm
+ fi
fi
# Host system, not a chroot.
else
More information about the Pkg-sysvinit-devel
mailing list