From nobody Sat Sep 7 01:47:59 2024 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4X0wwH5KTKz5WSTT; Sat, 07 Sep 2024 01:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4X0wwH3bxyz4k94; Sat, 7 Sep 2024 01:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725673679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wy1BgNx+sLOT8gTC2NcTkskje+v/for/z5oKA9nSEIg=; b=o7zOjpverSwOpQU+LAsd7y99Irnz+JTCyZpgIja2+4xCerMapPf58hhmrz1+SBlj5HJM4l n8fmzrADRb0eXXrHd/jx60peKs9V5SY8bB4IhBqJF7j8Dy6BzI75bFLpET2HynG+NDLquj Ue+kgtqJ0FqFcT9YeazD9H3knWl3ZvIuBK6mx7UlMv9+p+ortmo2iytZXsGw5tnrrZf4q4 OuXzsRoZJHInfGQr0Z0BthtfkO6mRr5AbDHNDAdGKothfXawqlV2STM7Vgul1yIqMfdvBd MgXi2LoyDPWFYpzN/fITtmcXlQpTvlVZeQOKaSLX3wRfjOp8uVtIUr15gpt8Kw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725673679; a=rsa-sha256; cv=none; b=iPUv3EEGAkLnZIb7OCyjtjl/0bMI1ogmgOWUkhrHq8mvYbSVQ7QCujJ3BpFso4/FpwtVqj 3mO378brReRs0kwcludqMdJ2Nd5kFtBvym4XZUVUrX9VD+pa9DvHr/ZG0pGfMVArS27EUx OfL8F/UAFlPkeQn5q6r6w7kbi6iMSvTBbDh9aiz7yOIhYdzzjqquW45MVFH//Z9PYenfhE b0gH2rny5Jc+fn9d5o+Gv9GqVvKTQxetlAR2pDRgm7W+P/wqsVfJTuoD7e6GekKM9WEy2s xiwKEKce6r47fV7cRchrzQb1VNef9afjikT7FRId5uuGA7rmnYnt0Bc9kegQ5A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725673679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wy1BgNx+sLOT8gTC2NcTkskje+v/for/z5oKA9nSEIg=; b=MMGJQZ+kFtCpkDcPp87D7uhXYTONyBaVtcB3K82rZwid6u7w5mcMv4DakvZEX+XYJBu2Qf tZyltmlKr1NCLCNiOJ48KyKN0/RexyaEZ6sACIqEXQ1SriCq7mGoATfbq7gm6JeG54EdUD Mb0+B+BxiobRRE0BQN84sCcapzYM4IWhaI2YBuTaj76dOpx12jRXYgkHfZzX8CmnYzcLew HAOt2wpKYIGUc2VmPiLIQkG74F74ALzZe5V69cJjIv9oQRdtV69OoN/wnB5dOx+QLV/GuZ 7pFS4lZYHCaS6Nbui3qfB6QAl4F36iItF1GQIuE89rfI5pCGQtlGiPVocXM1Sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4X0wwH3D4wzG32; Sat, 7 Sep 2024 01:47:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4871lxiq041689; Sat, 7 Sep 2024 01:47:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4871lxuF041686; Sat, 7 Sep 2024 01:47:59 GMT (envelope-from git) Date: Sat, 7 Sep 2024 01:47:59 GMT Message-Id: <202409070147.4871lxuF041686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: aaf4d3f3d194 - stable/14 - bsdinstall: Fix netconfig script when no interfaces are present List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: aaf4d3f3d1947531cc81f90ea5af522c719857ff Auto-Submitted: auto-generated The branch stable/14 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=aaf4d3f3d1947531cc81f90ea5af522c719857ff commit aaf4d3f3d1947531cc81f90ea5af522c719857ff Author: Jessica Clarke AuthorDate: 2024-02-03 01:52:37 +0000 Commit: Jessica Clarke CommitDate: 2024-09-07 00:00:46 +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 bdbbd42b3328..300dcc6f5e5e 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig +++ b/usr.sbin/bsdinstall/scripts/netconfig @@ -49,7 +49,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 ]; then