~ubuntu-branches/ubuntu/quantal/lxc/quantal-201208301614

« back to all changes in this revision

Viewing changes to debian/patches/0093-lxc-clone-copy-fstab

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn, Stéphane Graber, Serge Hallyn
  • Date: 2012-07-20 09:38:35 UTC
  • Revision ID: package-import@ubuntu.com-20120720093835-i38m7djaw2l2o3yi
Tags: 0.8.0~rc1-4ubuntu20
[ Stéphane Graber ]
* debian/apparmor/lxc-default-with-nesting: allow mounting /proc and /sys
  so containers can be created.

[ Serge Hallyn ]
* 0093-lxc-clone-copy-fstab: fix updating of lxc.mount entries in lxc-clone

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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>
 
6
Forwarded: yes
 
7
 
 
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
 
12
@@ -180,7 +180,7 @@
 
13
 sed -i '/lxc.utsname/d' $lxc_path/$lxc_new/config
 
14
 echo "lxc.utsname = $hostname" >> $lxc_path/$lxc_new/config
 
15
 
 
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; }
 
18
 
 
19
 if [ -e  $lxc_path/$lxc_orig/fstab ];then
 
20
     cp $lxc_path/$lxc_orig/fstab $lxc_path/$lxc_new/fstab