From 1c5a3c5854e8cab3ecf56d7394dc8474bc6acf5c Mon Sep 17 00:00:00 2001 From: mgariepy Date: Tue, 8 Nov 2016 11:42:34 -0500 Subject: [PATCH] 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 --- templates/lxc-centos.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/lxc-centos.in b/templates/lxc-centos.in index 2c444e4d6..8bd85a2af 100644 --- a/templates/lxc-centos.in +++ b/templates/lxc-centos.in @@ -451,6 +451,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 -- 2.47.2