The current handling of network interfaces in the installer is rather
confusing when somebody has an unsupported network device - it offers
to configure vlan0, but there is no interface on which a vlan can run
anyway.

Available network interfaces are: vlan0.
Which network interface do you wish to configure? (or 'done') [vlan0] 

This changes to only ask the question if some other network interfaces
is found.

amd64 installer iso with this at https://junkpile.org/cd71-netconf-novlan0.iso

comments? ok?

Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1201
diff -u -p -r1.1201 install.sub
--- install.sub 27 Jun 2022 13:48:38 -0000      1.1201
+++ install.sub 28 Jun 2022 11:37:06 -0000
@@ -1296,7 +1296,7 @@ ieee80211_config() {
 
 # Set up IPv4 and IPv6 interface configuration.
 configure_ifs() {
-       local _first _hn _if _name _p _vi
+       local _first _hn _if _name _p _vi _vn
 
        # Always need lo0 configured.
        ifconfig lo0 inet 127.0.0.1/8
@@ -1309,9 +1309,10 @@ configure_ifs() {
                # minor for the next offered vlan interface.
                _vi=$(get_ifs vlan | sed '$!d;s/^vlan//')
                [[ -n $_vi ]] && ((_vi++))
+               [[ -n $(get_ifs) ]] && _vn="vlan${_vi:-0}"
 
                ask_which "network interface" "do you wish to configure" \
-                       "\$(get_ifs) vlan${_vi:-0}" \
+                       "\$(get_ifs) $_vn" \
                        ${_p:-'$( (get_ifs netboot; get_ifs) | sed q )'}
                [[ $resp == done ]] && break
 

Reply via email to