From: Thierry Parmentelat Date: Sun, 1 Apr 2012 13:16:22 +0000 (+0200) Subject: fix Conflicts: X-Git-Tag: 5.0-rc27~67 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3d7c1e1b0e1aeb7b631883af2ea549443ade8e2e;p=build.git fix Conflicts: vbuild-init-lxc.sh --- 3d7c1e1b0e1aeb7b631883af2ea549443ade8e2e diff --cc vbuild-init-lxc.sh index fa7d1a1e,1608fa7c..97aad9ef --- a/vbuild-init-lxc.sh +++ b/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 ^$ + # 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