fix Conflicts:
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sun, 1 Apr 2012 13:16:22 +0000 (15:16 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sun, 1 Apr 2012 13:16:22 +0000 (15:16 +0200)
vbuild-init-lxc.sh

1  2 
vbuild-init-lxc.sh

@@@ -857,12 -865,12 +865,9 @@@ function main () 
            exit 1
      fi
  
-     # need lxc installed before we can run lxc-ls
-     prepare_host
-     
 -
 -    if [ ! -z "$(lxc-ls | grep $lxc)" ];then
 -        echo "container $lxc exists"
 -        exit 1
 -    fi
 -
 +    # be strict on lxc-lines matching name exactly using ^<name>$
 +    # as otherwise the timestamps may show up here
 +    lxc-ls | grep -q '^'"$lxc"'$' && { echo "container $lxc already exists - exiting" ; exit 1 ; }
      
      path=/var/lib/lxc
      rootfs_path=$path/$lxc/rootfs