mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-07 13:41:32 +00:00
lxc-debian using new lxc.mount.entry keyword
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>
This commit is contained in:
parent
e7938e9ee3
commit
3f4a86bf0f
@ -156,9 +156,7 @@ lxc.cgroup.devices.allow = c 254:0 rwm
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ ! -z "$TMPMNTFILE" ]; then
|
if [ ! -z "$TMPMNTFILE" ]; then
|
||||||
cat <<EOF >> $CONFFILE
|
cat $TMPMNTFILE >> $CONFFILE
|
||||||
lxc.mount = $TMPMNTFILE
|
|
||||||
EOF
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -166,7 +164,7 @@ write_lxc_mounts() {
|
|||||||
|
|
||||||
if [ ! -z "$MNTFILE" ]; then
|
if [ ! -z "$MNTFILE" ]; then
|
||||||
TMPMNTFILE=$(mktemp lxc.$NAME.XXXXXXXXXX)
|
TMPMNTFILE=$(mktemp lxc.$NAME.XXXXXXXXXX)
|
||||||
cp $MNTFILE $TMPMNTFILE
|
sed -e 's/^\(.*\)/lxc.mount.entry=&/' $MNTFILE >$TMPMNTFILE
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -316,6 +314,7 @@ create() {
|
|||||||
|
|
||||||
# remove the configuration files
|
# remove the configuration files
|
||||||
rm -f $CONFFILE
|
rm -f $CONFFILE
|
||||||
|
rm -f $TMPMNTFILE
|
||||||
|
|
||||||
if [ "$RES" != "0" ]; then
|
if [ "$RES" != "0" ]; then
|
||||||
echo "Failed to create '$NAME'"
|
echo "Failed to create '$NAME'"
|
||||||
|
Loading…
Reference in New Issue
Block a user