mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-02 21:04:08 +00:00
lxc-clone: fix handling of lxc.mount entries
The 'lxc.mount =' entry can have more than one space, or tabs, before the =. We only need to disambiguate from 'lxc.mount.entry'. So just check for a space or tab after mount. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
8b892c55b0
commit
4d5fb23ad8
@ -176,7 +176,7 @@ cp $lxc_path/$lxc_orig/config $lxc_path/$lxc_new/config
|
||||
sed -i '/lxc.utsname/d' $lxc_path/$lxc_new/config
|
||||
echo "lxc.utsname = $hostname" >> $lxc_path/$lxc_new/config
|
||||
|
||||
grep "lxc.mount =" $lxc_path/$lxc_new/config >/dev/null 2>&1 && { sed -i '/lxc.mount =/d' $lxc_path/$lxc_new/config; echo "lxc.mount = $lxc_path/$lxc_new/fstab" >> $lxc_path/$lxc_new/config; }
|
||||
grep "lxc.mount[ \t]" $lxc_path/$lxc_new/config >/dev/null 2>&1 && { sed -i '/lxc.mount[ \t]/d' $lxc_path/$lxc_new/config; echo "lxc.mount = $lxc_path/$lxc_new/fstab" >> $lxc_path/$lxc_new/config; }
|
||||
|
||||
if [ -e $lxc_path/$lxc_orig/fstab ];then
|
||||
cp $lxc_path/$lxc_orig/fstab $lxc_path/$lxc_new/fstab
|
||||
|
Loading…
Reference in New Issue
Block a user