Switch k8s_snapshot to using arrays.

This commit is contained in:
Tom Alexander
2023-07-18 17:34:29 -04:00
parent b9a199c5f5
commit 8424abdfa9
2 changed files with 23 additions and 5 deletions

View File

@@ -36,7 +36,7 @@ function main {
kill_all_bhyve
log "Rolling back to snapshot $1"
while read target; do
zfs rollback "$target"
doas zfs rollback "$target"
done<<<"$rollback_targets"
launch_all_bhyve
log "Done."
@@ -49,7 +49,7 @@ function kill_all_bhyve {
function launch_all_bhyve {
log "Launching all virtual machines."
for vm in $VMS[@]; do tmux new -d -s $vm doas bhyve_netgraph_bridge start $vm zdata/vm/$vm /vm/$vm; sleep 5; done
for vm in "${VMS[@]}"; do log "starting $vm"; tmux new -d -s $vm doas bhyve_netgraph_bridge start $vm zdata/vm/$vm /vm/$vm; sleep 5; done
}
function sanity_check_targets {