diff options
author | Stefan Kreutz <mail@skreutz.com> | 2025-03-23 19:34:29 +0100 |
---|---|---|
committer | Stefan Kreutz <mail@skreutz.com> | 2025-03-23 19:34:29 +0100 |
commit | a6dcdb5da34a45f1b5ef513e3c6d24bf948290d0 (patch) | |
tree | 6706a46737e43441761324709e1b4eed291ac8bd | |
parent | f223bcc8ff66a943d361519655078aa9ba672001 (diff) | |
download | autoinstall-openbsd-on-qemu-a6dcdb5da34a45f1b5ef513e3c6d24bf948290d0.tar |
Check mirror iff. recreating machine
-rwxr-xr-x | autoinstall-openbsd-on-qemu | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/autoinstall-openbsd-on-qemu b/autoinstall-openbsd-on-qemu index 503d828..9a1fc85 100755 --- a/autoinstall-openbsd-on-qemu +++ b/autoinstall-openbsd-on-qemu @@ -203,19 +203,18 @@ then done fi -# Create disk image if not exists. +# Create disk image if not exists, and wait until mirror is served. if [ ! -e "${DISK_FILE}" ] then qemu-img create -q -f qcow2 "${DISK_FILE}" -o nocow=on "${DISK_SIZE}" printf "Created %s copy-on-write disk image at %s\\n" "${DISK_SIZE}" "${DISK_FILE}" -fi -# Wait until ./mirror is served at http://127.0.0.1/. -while [ ! "$( curl --silent --location --write-out '%{http_code}\n' --output /dev/null http://127.0.0.1/install.conf )" = 200 ] -do - ( >&2 printf "Please serve the directory ./mirror at http://127.0.0.1/\n" ) - sleep 5 -done + while [ ! "$( curl --silent --location --write-out '%{http_code}\n' --output /dev/null http://127.0.0.1/install.conf )" = 200 ] + do + ( >&2 printf "Please serve the directory ./mirror at http://127.0.0.1/ (port 80)\n" ) + sleep 5 + done +fi # Auto-install OpenBSD. printf "Starting virtual machine ...\\n" |