add FDE check

This commit is contained in:
mischa 2024-05-26 09:52:34 +00:00
parent c40181bf7b
commit 12ad4a615d
2 changed files with 8 additions and 2 deletions

View File

@ -44,6 +44,9 @@ if vmctl show ${1%.txt} >/dev/null 2>&1; then
IPV4=$(grep -A2 ${1%.txt} /etc/dhcpd.conf | awk '/fixed/ {print $2}' | tr -d ';') IPV4=$(grep -A2 ${1%.txt} /etc/dhcpd.conf | awk '/fixed/ {print $2}' | tr -d ';')
IPV6=$(grep -A3 ${1%.txt} /etc/dhcpd.conf | awk '/fixed-address-ipv6/ {print $2}' | tr -d ';') IPV6=$(grep -A3 ${1%.txt} /etc/dhcpd.conf | awk '/fixed-address-ipv6/ {print $2}' | tr -d ';')
echo "a reset ${IPV4} ${IPV6}" echo "a reset ${IPV4} ${IPV6}"
if [ -f "${HOME}/vms/${1}-fde" ]; then
rm -rf ${HOME}/vms/${1}-fde
fi
${BINPATH}/remove.pl ${1} ${BINPATH}/remove.pl ${1}
${BINPATH}/deploy.pl ${BINPATH}/deploy.pl
if [[ -z ${DHCPD} ]]; then if [[ -z ${DHCPD} ]]; then

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# Copyright (c) 2019-2023 Mischa Peters <mischa @ openbsd.amsterdam> # Copyright (c) 2019-2024 Mischa Peters <mischa @ openbsd.amsterdam>
# #
# Permission to use, copy, modify, and distribute this software for any # Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above # purpose with or without fee is hereby granted, provided that the above
@ -26,11 +26,14 @@ done
CYCLES=$((${#VMS[*]}/${CPU}+1)) CYCLES=$((${#VMS[*]}/${CPU}+1))
echo "Starting ${#VMS[*]} VMs on ${CPU} CPUs in ${CYCLES} cycle(s), waiting ${SLEEP} seconds after each cycle." echo "Starting ${#VMS[*]} VMs on ${CPU} CPUs in ${CYCLES} cycle(s), waiting ${SLEEP} seconds after each cycle."
echo "Excluding FDE VMs."
COUNTER=0 COUNTER=0
for i in ${VMS[*]}; do for i in ${VMS[*]}; do
COUNTER=$((${COUNTER}+1)) COUNTER=$((${COUNTER}+1))
if [ ! -f "${HOME}/vms/${i}.txt-fde" ]; then
vmctl start ${i} ; sleep ${DELAY} vmctl start ${i} ; sleep ${DELAY}
fi
if [ $COUNTER -eq $CPU ]; then if [ $COUNTER -eq $CPU ]; then
sleep ${SLEEP} sleep ${SLEEP}
COUNTER=0 COUNTER=0