diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2023-01-17 16:14:24 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2023-01-17 16:14:24 +0000 |
commit | 268f7a92c703e4a2540b4dd9e476eac915678a96 (patch) | |
tree | 2efd67534eca15c9a72cd5f1c481172babdf5694 | |
parent | 5fdaa9482c74416051cedfa3223841608e846739 (diff) |
Skip all interface config questions when there are none
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
-rw-r--r-- | distrib/miniroot/install.sub | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 701b5df1228..4592f371f1a 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/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> @@ -1322,6 +1322,10 @@ configure_ifs() { 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= |