]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc-debian using new lxc.mount.entry keyword
authorMichel Normand <michel.mno@free.fr>
Fri, 13 Nov 2009 10:48:29 +0000 (11:48 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Fri, 13 Nov 2009 10:48:29 +0000 (11:48 +0100)
Fix script to not add a fstab file.

Signed-off-by: Michel Normand <michel_mno@laposte.net>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
scripts/lxc-debian.in

index 7e907c5333c3b7c6be007cd8ab1c16769559b403..ff9fe4d1c7c67613626521bea10cc4f451aa6f5f 100755 (executable)
@@ -156,9 +156,7 @@ lxc.cgroup.devices.allow = c 254:0 rwm
 EOF
 
        if [ ! -z "$TMPMNTFILE" ]; then
-cat <<EOF >> $CONFFILE
-lxc.mount = $TMPMNTFILE
-EOF
+               cat $TMPMNTFILE >> $CONFFILE
        fi
 }
 
@@ -166,7 +164,7 @@ write_lxc_mounts() {
 
     if [ ! -z "$MNTFILE" ]; then
        TMPMNTFILE=$(mktemp lxc.$NAME.XXXXXXXXXX)
-       cp $MNTFILE $TMPMNTFILE
+       sed -e 's/^\(.*\)/lxc.mount.entry=&/' $MNTFILE >$TMPMNTFILE
     fi
 }
 
@@ -316,6 +314,7 @@ create() {
 
     # remove the configuration files
     rm -f $CONFFILE
+    rm -f $TMPMNTFILE
 
     if [ "$RES" != "0" ]; then
        echo "Failed to create '$NAME'"