]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
ubuntu templates: don't check for $rootfs/run/shm
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 7 Aug 2014 03:23:48 +0000 (03:23 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 8 Aug 2014 15:40:03 +0000 (11:40 -0400)
/dev/shm must be turned from a directory into a symlink to /run/shm.
The templates do this only if they find -d $rootfs/run/shm.  Since /run
will be a tmpfs, checking for it in the rootfs is silly.  It also is
currently broken as ubuntu cloud images have an empty /run.

(this should fix https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1353734)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
templates/lxc-ubuntu-cloud.in
templates/lxc-ubuntu.in

index 5de1dbd59566bdd5902e5f3817b4b77f6b5fb9aa..c4eb5ca42068824b948a96d679652c14cbb17322 100644 (file)
@@ -122,7 +122,7 @@ EOF
     # get bind mounted to the host's /run/shm.  So try to rmdir
     # it, and in case that fails move it out of the way.
     # NOTE: This can only be removed once 12.04 goes out of support
-    if [ ! -L $rootfs/dev/shm ] && [ -d $rootfs/run/shm ] && [ -e $rootfs/dev/shm ]; then
+    if [ ! -L $rootfs/dev/shm ] && [ -e $rootfs/dev/shm ]; then
         rmdir $rootfs/dev/shm 2>/dev/null || mv $rootfs/dev/shm $rootfs/dev/shm.bak
         ln -s /run/shm $rootfs/dev/shm
     fi
index e54b5586b9d74d08d791f5cf1e1f5a30318b18af..43d4817558b3420e4dda943ac49c5786967c3d1f 100644 (file)
@@ -620,7 +620,7 @@ EOF
     # get bind mounted to the host's /run/shm.  So try to rmdir
     # it, and in case that fails move it out of the way.
     # NOTE: This can only be removed once 12.04 goes out of support
-    if [ ! -L $rootfs/dev/shm ] && [ -d $rootfs/run/shm ] && [ -e $rootfs/dev/shm ]; then
+    if [ ! -L $rootfs/dev/shm ] && [ -e $rootfs/dev/shm ]; then
         rmdir $rootfs/dev/shm 2>/dev/null || mv $rootfs/dev/shm $rootfs/dev/shm.bak
         ln -s /run/shm $rootfs/dev/shm
     fi