]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
oracle: Fix /dev/shm
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 29 Jan 2015 21:59:59 +0000 (22:59 +0100)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 29 Jan 2015 23:08:02 +0000 (00:08 +0100)
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-oracle.in

index c35ac40d6ad8077281792d6cb73b797c01c700c9..5a6c3dede986ba26e747556140e820880915d172 100644 (file)
@@ -297,13 +297,13 @@ EOF
     if [ $container_release_major = "4" -o $container_release_major = "5" ]; then
         grep -q "mount -t tmpfs tmpfs /dev/shm" $container_rootfs/etc/rc.sysinit
         if [ $? -eq 1 ]; then
-            echo "mount -t tmpfs tmpfs /dev/shm" >>$container_rootfs/etc/rc.sysinit
-            echo "mount -t tmpfs tmpfs /dev/shm" >>$container_rootfs/etc/rc.d/rc.sysinit
+            echo "mkdir -p /dev/shm && mount -t tmpfs tmpfs /dev/shm" >>$container_rootfs/etc/rc.sysinit
+            echo "mkdir -p /dev/shm && mount -t tmpfs tmpfs /dev/shm" >>$container_rootfs/etc/rc.d/rc.sysinit
         fi
     fi
     if [ $container_release_major = "6" ]; then
-        sed -i 's|mount -n -o remount /dev/shm >/dev/null 2>&1$|mount -t tmpfs tmpfs /dev/shm # LXC|' $container_rootfs/etc/rc.sysinit
-        sed -i 's|mount -n -o remount /dev/shm >/dev/null 2>&1$|mount -t tmpfs tmpfs /dev/shm # LXC|' $container_rootfs/etc/rc.d/rc.sysinit
+        sed -i 's|mount -n -o remount /dev/shm >/dev/null 2>&1$|mkdir -p /dev/shm && mount -t tmpfs tmpfs /dev/shm # LXC|' $container_rootfs/etc/rc.sysinit
+        sed -i 's|mount -n -o remount /dev/shm >/dev/null 2>&1$|mkdir -p /dev/shm && mount -t tmpfs tmpfs /dev/shm # LXC|' $container_rootfs/etc/rc.d/rc.sysinit
     fi
 
     # there might be other services that are useless but the below set is a good start