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