File lxc-opensuse-tmpfs.patch of Package lxc
From d088de50c551f4941ae24b536057fc57915ee7d7 Mon Sep 17 00:00:00 2001
From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 20 Apr 2012 14:36:53 +0200
Subject: [PATCH] shutdown fixes for openSUSE container
- mount /run on tmpfs outside container
- replace /var/run bind mount on /run by a symlink
---
templates/lxc-opensuse.in | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/templates/lxc-opensuse.in b/templates/lxc-opensuse.in
index 0946f95..076fe4f 100644
--- a/templates/lxc-opensuse.in
+++ b/templates/lxc-opensuse.in
@@ -201,6 +201,10 @@ EOF
# create mtab symlink
rm -f $cache/partial-$arch/etc/mtab
ln -sf /proc/self/mounts $cache/partial-$arch/etc/mtab
+
+# ensure /var/run and /run are symlinked
+ rm -fr $cache/partial-$arch/var/run
+ ln -s -f ../run $cache/partial-$arch/var/run
if [ $? -ne 0 ]; then
echo "Failed to download the rootfs, aborting."
return 1
@@ -307,6 +311,7 @@ EOF
cat <<EOF > $path/fstab
proc $rootfs/proc proc nodev,noexec,nosuid 0 0
sysfs $rootfs/sys sysfs defaults 0 0
+tmpfs $rootfs/run tmpfs mode=0755,nodev,nosuid 0 0
EOF
if [ $? -ne 0 ]; then
--
1.7.7