From nobody Sat Feb 03 02:00:33 2024 X-Original-To: dev-commits-src-all@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 4TRbSx6c65z58mC6; Sat, 3 Feb 2024 02:00:33 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TRbSx64fcz4b4f; Sat, 3 Feb 2024 02:00:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706925633; 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=jsoiLNfZxvbpB6U7zAPBZW5XnWv+a13YhBwPliu+xpA=; b=Gwq1lfEMeTx1GQaTFhMssy6Jxp6BrXKa6AU5fHbrpBjPYeikILNas14waIgmpgkdvTa+W/ uMqbF4h0tNonjeReErx5f5hJYJaecD+bPjIsY7gudbqi554Nh51U/OoDDPMQkFGMWhZav2 8gpsZG4TYz89cQJ1g+Dq0qoIFfE38pP8F6puug3ouyJJ+SONYqSRPPiV3XXwa9Ei1eNQuV tZy60u4I+nCkvjhHf9NIlRMj2tC189Gzw79vbJJJcSKz4QEjot3EclsmSQ5a9DKxLPvFdl 689lF7ujugbww08bgYdtWyc+EF4W1ZpOUmJChznjb/bOAmyDMT/10RA8GWn2VQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706925633; 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=jsoiLNfZxvbpB6U7zAPBZW5XnWv+a13YhBwPliu+xpA=; b=rTBPSxunji5EKAdZ50XsoFMWwZbG7iJXnNkU6WtcOgib8c0is6FCxHoHv7/znNSmPiMMay Wst5jXOinGNbJ6nS61CEAC7aoLuIxw6cGsn4kvqxQLns/aV5/rsZcMliTb914nKEQpkqJr J/vw7rakZyBQN9y6XT1L6czSxd2/kdmvQ4KCLi+Xx80lH3BvgELIENZGdJLSSwkm94zCi8 lPXnCoF/q77A1qS6XfnbAN55+bDm3vdelsDBd022Ca4rxkmVvokR56j+DIBnkhhgvgBAWg G1XokgpuJja9ca1yFJkwWQtNGpAridDQju6vGF5pi7RVGp2I3gqUMV6sy4oJlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706925633; a=rsa-sha256; cv=none; b=v684CEcn9kLZ1WBH5GiAPdKa85Zhk6Rf9PbUOp5q8ZLd/MiHKW4a+l9FNoJ6cd5gTjdvJs VwJWS4RXMEJcMPNqnlopP7rNd+C0/HYtnAZOOxDZ5D2D9Gw20US1dFbA6bSWCiZmm9p96m hPu64S1Xn6ffsE2ry3B3/UBJ6amqgZ79pJIwHkQNrYH9vWtFZp2g3aWR7XJfRWnxFTj11P 52LtAZBsHtCmEFrHmo3Xx0CEkR7px3Ogyi4l6U0x/LR+BIA8frXphWMIEtcQxKDH+itpzQ gMUTr+E+CMF/LqWEzI3gqPjV2GWi+gpIlHy/M8tZrAMI2ryhjNvbppR8Otg/QA== 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 4TRbSx56wxzvHh; Sat, 3 Feb 2024 02:00:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41320Xxj054539; Sat, 3 Feb 2024 02:00:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41320XZ4054536; Sat, 3 Feb 2024 02:00:33 GMT (envelope-from git) Date: Sat, 3 Feb 2024 02:00:33 GMT Message-Id: <202402030200.41320XZ4054536@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: b809c7d6a269 - main - bsdinstall: Fix netconfig script when no interfaces are present List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: b809c7d6a26924ac351e49a15011da718cc3feec Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=b809c7d6a26924ac351e49a15011da718cc3feec commit b809c7d6a26924ac351e49a15011da718cc3feec Author: Jessica Clarke AuthorDate: 2024-02-03 01:52:37 +0000 Commit: Jessica Clarke CommitDate: 2024-02-03 01:52:37 +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 --- 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 addf5cb527d6..a370d455e211 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