[Bug 974584] Re: Semaphores cannot be created in lxc container

Serge Hallyn 974584 at bugs.launchpad.net
Wed May 30 18:09:40 UTC 2012


Here is version tested and working in debootstrap.

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


** Patch added: "sysvinit-shm3.debdiff"
   https://bugs.launchpad.net/launchpad/+bug/974584/+attachment/3169450/+files/sysvinit-shm3.debdiff

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/974584

Title:
  Semaphores cannot be created in lxc container

To manage notifications about this bug go to:
https://bugs.launchpad.net/launchpad/+bug/974584/+subscriptions



More information about the Ubuntu-server-bugs mailing list