]> git.pld-linux.org Git - packages/lxc.git/blobdiff - lxc-pld.in.sh
typo fix
[packages/lxc.git] / lxc-pld.in.sh
index 57132a58584a82063cdb4cbe5fc085d7067d2c2f..ca4a6de013c19decfd423a2eec8290e5a18a23ec 100755 (executable)
@@ -225,9 +225,12 @@ copy_configuration()
        mkdir -p $config_path
        grep -q "^lxc.rootfs" $config_path/config 2>/dev/null || echo "lxc.rootfs = $rootfs_path" >> $config_path/config
        cat <<EOF >> $config_path/config
+# Most of below settings should be taken as defaults  from
+# lxc.include = /usr/share/lxc/config/common.conf
 lxc.utsname = $utsname
 lxc.tty = 4
 lxc.pts = 1024
+# Consider if below line is right for systemd container
 lxc.mount = $config_path/fstab
 lxc.cap.drop = sys_module mac_admin mac_override sys_time
 
@@ -407,12 +410,15 @@ if [ "$(id -u)" != "0" ]; then
        exit 1
 fi
 
-if [ -z "$rootfs_path" ]; then
-       rootfs_path=$path/rootfs
-       # check for 'lxc.rootfs' passed in through default config by lxc-create
-       if grep -q '^lxc.rootfs' $path/config 2>/dev/null ; then
-               rootfs_path=$(awk -F= '/^lxc.rootfs =/{ print $2 }' $path/config)
-       fi
+if [ -z "$rootfs" ]; then
+    rootfs_path=$path/rootfs
+    # check for 'lxc.rootfs' passed in through default config by lxc-create
+    # TODO: should be lxc.rootfs.mount used instead?
+    if grep -q '^lxc.rootfs' $path/config 2>/dev/null ; then
+            rootfs_path=$(awk -F= '/^lxc.rootfs =/{ print $2 }' $path/config)
+    fi
+else
+    rootfs_path=$rootfs
 fi
 config_path=$default_path/$name
 cache=$cache_base/$release
This page took 0.03399 seconds and 4 git commands to generate.