Move the lock check until after the arg parser

This commit is contained in:
Pim van Pelt
2023-05-06 22:04:30 +00:00
parent 8109ef4b1c
commit ba4a3e9fef

10
command
View File

@ -2,11 +2,6 @@
BUILD=${BUILD:=default} BUILD=${BUILD:=default}
LAB=${LAB:=0} LAB=${LAB:=0}
[ -r .lock${LAB} ] && {
echo "Lock file for LAB${LAB}, bailing"
exit
}
## Do not touch below this line ## Do not touch below this line
LABDIR=/var/lab LABDIR=/var/lab
STAGING=$LABDIR/staging STAGING=$LABDIR/staging
@ -18,6 +13,11 @@ CMD=$1
exit exit
} }
[ -r .lock${LAB} ] && {
echo "Lock file for LAB${LAB}, bailing"
exit
}
VMS=$(ls -1 build/${BUILD}/${HVN}/) VMS=$(ls -1 build/${BUILD}/${HVN}/)
for VM in $VMS; do for VM in $VMS; do