Date: Mon, 15 Dec 2025 18:18:23 +0000 From: Jessica Clarke <jrtc27@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 919db8472a3e - stable/13 - bsdinstall: Fix netconfig script when no interfaces are present Message-ID: <694050ef.232fa.3616a127@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=919db8472a3e88e7da79c522de1f0a16c4c28c7a commit 919db8472a3e88e7da79c522de1f0a16c4c28c7a Author: Jessica Clarke <jrtc27@FreeBSD.org> AuthorDate: 2024-02-03 01:52:37 +0000 Commit: Jessica Clarke <jrtc27@FreeBSD.org> CommitDate: 2025-12-15 17:56:34 +0000 bsdinstall: Fix netconfig script when no interfaces are present The script uses [ -z "$INTERFACES" ] to check if the list of interfaces is empty and will exit early if so, but INTERFACES always contains at least a space due to the way it appends the list of wireless devices. Fix this by only adding the space when there are devices to append, mirroring the behaviour for non-wireless devices above (both will result in a redundant leading space when the list is non-empty, but that one is harmless). Fixes: 159ca5c844cd ("Adapt to new wireless scheme where base wlan interfaces do not show up in ifconfig anymore.") MFC after: 1 week (cherry picked from commit b809c7d6a26924ac351e49a15011da718cc3feec) --- usr.sbin/bsdinstall/scripts/netconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig index ca39b225841b..91852db3276c 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig +++ b/usr.sbin/bsdinstall/scripts/netconfig @@ -46,7 +46,8 @@ for IF in `ifconfig -l`; do INTERFACES="$INTERFACES $IF" done -INTERFACES="$INTERFACES $(sysctl -in net.wlan.devices)" +WIRELESS_INTERFACES="$(sysctl -in net.wlan.devices)" +INTERFACES="$INTERFACES${WIRELESS_INTERFACES:+ }$WIRELESS_INTERFACES" is_wireless_if() { for IF in $(sysctl -in net.wlan.devices); do if [ $IF = $1 ]; thenhelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?694050ef.232fa.3616a127>
