]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
create symlink for /var/run
authormgariepy <mgariepy@users.noreply.github.com>
Tue, 8 Nov 2016 16:42:34 +0000 (11:42 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 18 Nov 2016 01:36:21 +0000 (20:36 -0500)
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 <gariepy.marc@gmail.com>
templates/lxc-centos.in

index 32ce9d40ea5404638e469e898e76c6cec8230574..e09e9c4431fbcabea5b59668dba0f597b718cb73 100644 (file)
@@ -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