Even without any interfaces the installer still asks for one and only
continues when the only possible answer 'done' is provided.
That means one mandatory but useless answer during installations like
# vmctl start -c -d ./install72.img -d ./disk.img test
...
System hostname? (short form, e.g. 'foo') test
Available network interfaces are: .
Network interface to configure? (name, lladdr, '?', or 'done')
A response is required.
Network interface to configure? (name, lladdr, '?', or 'done') ?
Available network interfaces are: .
Network interface to configure? (name, lladdr, '?', or 'done') done
DNS domain name? (e.g. 'example.com') [my.domain]
...
Skip it when there is no viable answer:
# vmctl start -c -d ./install72.img -d ./disk.img test
...
System hostname? (short form, e.g. 'foo') test
DNS domain name? (e.g. 'example.com') [my.domain]
...
OK deraadt
#!/bin/ksh
-# $OpenBSD: install.sub,v 1.1219 2023/01/12 15:03:23 kn Exp $
+# $OpenBSD: install.sub,v 1.1220 2023/01/17 16:14:23 kn Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
while :; do
set -sA _ifs -- $(get_ifs)
+ # Skip all interface configuration questions if there is no
+ # physical interface to begin with.
+ ((${_ifs[*]} == 0)) && break
+
# Discover last configured vlan interface and increment its
# minor for the next offered vlan interface.
_vi=