be safe
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sun, 1 Apr 2012 13:17:23 +0000 (15:17 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Sun, 1 Apr 2012 13:17:23 +0000 (15:17 +0200)
vbuild-init-lxc.sh

index 97aad9e..a2b52e0 100755 (executable)
@@ -867,7 +867,7 @@ function main () {
 
     # 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 ; }
+    lxc-ls -1 | grep -q '^'"$lxc"'$' && { echo "container $lxc already exists - exiting" ; exit 1 ; }
     
     path=/var/lib/lxc
     rootfs_path=$path/$lxc/rootfs