From 1846e71a27b2f08940c807bd5466cada8093cea9 Mon Sep 17 00:00:00 2001 From: Michel Normand Date: Fri, 13 Nov 2009 11:48:29 +0100 Subject: [PATCH] lxc-debian to not use empty mount table lxc should not save in config generated file the name of an empty file if no additionnal mount point specified by user. Signed-off-by: Michel Normand Signed-off-by: Daniel Lezcano --- scripts/lxc-debian.in | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/lxc-debian.in b/scripts/lxc-debian.in index b874d0462..7e907c533 100755 --- a/scripts/lxc-debian.in +++ b/scripts/lxc-debian.in @@ -136,7 +136,6 @@ lxc.network.flags = up lxc.network.link = br0 lxc.network.name = eth0 lxc.network.mtu = $MTU -lxc.mount = $TMPMNTFILE lxc.rootfs = $ROOTFS lxc.cgroup.devices.deny = a # /dev/null and zero @@ -155,13 +154,18 @@ lxc.cgroup.devices.allow = c 5:2 rwm # rtc lxc.cgroup.devices.allow = c 254:0 rwm EOF + + if [ ! -z "$TMPMNTFILE" ]; then +cat <> $CONFFILE +lxc.mount = $TMPMNTFILE +EOF + fi } write_lxc_mounts() { - TMPMNTFILE=$(mktemp lxc.XXXXXXXXXX) - if [ ! -z "$MNTFILE" ]; then + TMPMNTFILE=$(mktemp lxc.$NAME.XXXXXXXXXX) cp $MNTFILE $TMPMNTFILE fi } @@ -312,7 +316,6 @@ create() { # remove the configuration files rm -f $CONFFILE - rm -f $TMPMNTFILE if [ "$RES" != "0" ]; then echo "Failed to create '$NAME'" -- 2.39.2