diff --git a/testutil/singlevm/setup.sh b/testutil/singlevm/setup.sh index f0f93074c..84d043845 100755 --- a/testutil/singlevm/setup.sh +++ b/testutil/singlevm/setup.sh @@ -19,9 +19,16 @@ fedora_cloud_url="https://download.fedoraproject.org/pub/fedora/linux/releases/2 download=0 hosts_file_backup="/etc/hosts.orig.$RANDOM" -#Ensure that the local cache exists +#Create a directory where all the certificates, binaries and other +#dependencies are placed mkdir -p "$ciao_bin" +if [ ! -d "$ciao_bin" ] +then + echo "FATAL ERROR: Unable to create $ciao_bin" + exit 1 +fi + # Copy the cleanup scripts cp "$ciao_scripts"/cleanup.sh "$ciao_bin" @@ -94,16 +101,6 @@ echo "$ciao_ip $ciao_host" > hosts sudo mv hosts /etc/hosts sudo rm -rf /var/lib/ciao/instances -#Create a directory where all the certificates, binaries and other -#dependencies are placed -mkdir "$ciao_bin" - -if [ ! -d "$ciao_bin" ] -then - echo "FATAL ERROR: Unable to create $ciao_bin" - exit 1 -fi - cd "$ciao_bin" #Cleanup any old artifcats