From 6e6862ddd3d654747afc7e2c953fcbc1da7c187e Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 23 Jan 2014 18:16:14 +0100 Subject: [PATCH] lxc root fs might be created already but almost empty, with the timestamp in it only --- lbuild-initvm.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lbuild-initvm.sh b/lbuild-initvm.sh index 67e96ce1..82793edc 100755 --- a/lbuild-initvm.sh +++ b/lbuild-initvm.sh @@ -921,8 +921,6 @@ function main () { usage ;; esac - echo 'build mode=' $BUILD_MODE 'test mode=' $TEST_MODE - # the set of preinstalled packages - depends on vbuild or vtest if [ -n "$BUILD_MODE" ] ; then PREINSTALLED=devel.pkgs @@ -949,8 +947,8 @@ function main () { lxc=$1 ; shift lxc_root=/vservers/$lxc # rainchecks - [ -d $lxc_root ] && \ - { echo "container $lxc already exists in filesystem - exiting" ; exit 1 ; } + almost_empty $lxc_root || \ + { echo "container $lxc already exists in $lxc_root - exiting" ; exit 1 ; } virsh -c lxc:/// domuuid $lxc >& /dev/null && \ { echo "container $lxc already exists in libvirt - exiting" ; exit 1 ; } mkdir -p $lxc_root -- 2.43.0