From: mgariepy Date: Tue, 8 Nov 2016 16:42:34 +0000 (-0500) Subject: create symlink for /var/run X-Git-Tag: lxc-1.0.9~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20aa5993a60582fea85f471abcd64bd9ccb78990;p=thirdparty%2Flxc.git create symlink for /var/run this patch create /var/run link to point to /run. This will fix various issue present when /var/run is persistent. Signed-off-by: Marc Gariepy --- diff --git a/templates/lxc-centos.in b/templates/lxc-centos.in index 32ce9d40e..e09e9c443 100644 --- a/templates/lxc-centos.in +++ b/templates/lxc-centos.in @@ -441,6 +441,13 @@ EOF $YUM install $PKG_LIST + # create symlink for /var/run -> ../run + if [ "$release" = "7" ]; then + mv $INSTALL_ROOT/var/run/* $INSTALL_ROOT/run/ + rmdir $INSTALL_ROOT/var/run + ln -sf ../run $INSTALL_ROOT/var/run + fi + if [ $? -ne 0 ]; then echo "Failed to download the rootfs, aborting." return 1