1
Description: lxc-clone: fix handling of lxc.mount entries
2
The 'lxc.mount =' entry can have more than one space, or tabs, before the =.
3
We only need to disambiguate from 'lxc.mount.entry'. So just check for a
4
space or tab after mount.
5
Author: Serge Hallyn <serge.hallyn@ubuntu.com>
8
Index: lxc-0.8.0~rc1/src/lxc/lxc-clone.in
9
===================================================================
10
--- lxc-0.8.0~rc1.orig/src/lxc/lxc-clone.in 2012-07-20 09:20:08.848993559 -0500
11
+++ lxc-0.8.0~rc1/src/lxc/lxc-clone.in 2012-07-20 09:37:06.312976331 -0500
13
sed -i '/lxc.utsname/d' $lxc_path/$lxc_new/config
14
echo "lxc.utsname = $hostname" >> $lxc_path/$lxc_new/config
16
-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; }
17
+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; }
19
if [ -e $lxc_path/$lxc_orig/fstab ];then
20
cp $lxc_path/$lxc_orig/fstab $lxc_path/$lxc_new/fstab