- autoinstall: dead mirror + fallback offline-install, so the installed base is exactly the ISO's; late-commands run offline-apt-install.sh on CIDATA packages/ (local apt repo, one transaction, errors fail the install, log /var/log/offline-apt-install.log); first boot no longer runs dpkg -i; real archive sources written back at the end. - download-packages.sh --iso: unpacks the ISO's default install source into a docker image (pxe-iso-base:<version>) and downloads there: all updates of the base, the explicit list (zip included) and the newest pool packages with their closure; writes Packages + explicit.list and checks the set offline in a fresh base container (--network none). - offline-apt-install.sh: new; also used by that check (--simulate). - build-usb.sh: ships Packages, explicit.list and the script; refuses a set without them. - tests/vm: pxetest-client-nosb (Secure Boot off, e1000e, SATA), one client at a time.
29 lines
947 B
Bash
Executable File
29 lines
947 B
Bash
Executable File
#!/bin/bash
|
|
# Shut pxetest VMs down (ACPI, then force after a timeout). Keeps them
|
|
# defined. Idempotent.
|
|
# Usage: tests/vm/stop.sh [server|client|client2|all] (default: all)
|
|
source "$(dirname "$0")/common.sh"
|
|
|
|
which="${1:-all}"
|
|
case "$which" in
|
|
server) vms=("$SERVER_VM") ;;
|
|
client) vms=("$CLIENT_VM") ;;
|
|
client2|nosb) vms=("$CLIENT2_VM") ;;
|
|
all) vms=("$CLIENT_VM" "$CLIENT2_VM" "$SERVER_VM") ;;
|
|
*) die "usage: $0 [server|client|client2|all]" ;;
|
|
esac
|
|
for vm in "${vms[@]}"; do
|
|
dom_exists "$vm" || continue
|
|
[ "$(dom_state "$vm")" = "shut off" ] && { log "$vm already off"; continue; }
|
|
virsh shutdown "$vm" >/dev/null 2>&1 || true
|
|
for _ in $(seq 1 60); do
|
|
[ "$(dom_state "$vm")" = "shut off" ] && break
|
|
sleep 1
|
|
done
|
|
if [ "$(dom_state "$vm")" != "shut off" ]; then
|
|
log "$vm ignored ACPI shutdown; forcing off"
|
|
virsh destroy "$vm" >/dev/null
|
|
fi
|
|
log "$vm off"
|
|
done
|