Fold destroy, pristine and virshall into 'command'. Add a lock to avoid destroying active/inuse LABs

This commit is contained in:
Pim van Pelt
2023-05-06 22:03:42 +00:00
parent 9ead69a5f6
commit 8109ef4b1c
6 changed files with 55 additions and 67 deletions

5
create
View File

@ -19,6 +19,11 @@ BASE=${BASE:=ssd-vol0/hvn0.chbtl0.ipng.ch/ssd-vol0/vpp-proto-disk0@20230403-rele
BUILD=${BUILD:=default}
LAB=${LAB:=0}
[ -r .lock${LAB} ] && {
echo "Lock file for LAB${LAB}, bailing"
exit
}
## Do not touch below this line
LABDIR=/var/lab
STAGING=$LABDIR/staging