From nobody Sat Feb 03 23:11:55 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 4TS7gv5Gfjz58dRp; Sat, 3 Feb 2024 23:11:55 +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 4TS7gv4nkSz4NHd; Sat, 3 Feb 2024 23:11:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707001915; 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=swQTjj0whC2OBjNWSJ0qcNmc32gv6cO3kIQAMgQXEVI=; b=X3hTMVZLvw69yljEYUwyjCx/wUfBDdnsTjpv3NlX70+TPKygBO021EapqU1d+IWyA0yASl DLnDvETTbBPBO6y3m5QVl6kJ3/5DYy7xlXjx44eE5n7vqM2eLkyZx/IjGeLVaK6BtdmKvR NAcMHbR6L9AOntVhna8rXQHlrV60IO0DdPCiW57mojjAuuTyVVcb2nnS7bYVdE6/V0FVio AX8aMn/Fp/LJh2bxjxCiEiAsPyxt5p1aV7uj+NfGiI4JiBkHzD2Sy1Aoiw/GsT3bAnNkE5 EketdYeYmuN1O9mzjzlLmnZQvTXmPhuBk41nQPTPr0H9/nkg0jzOoLmyzJPONA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707001915; 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=swQTjj0whC2OBjNWSJ0qcNmc32gv6cO3kIQAMgQXEVI=; b=Jhjqm8r2QcpBtkXDFr9LgCv9WIsCH+bIel33JFRSeClINqs4lNb9fVGBGheVcgH9icSaDi yCiPRYZUv/YOzmZ4be4rVYYhsoOawFOUEfPdetp9R7TeL6PWzz+xSwpN693QXZOqLSwNBL 64FLG1DJLeEnOJ1k1a0eieAX20JUnHxWxINhdlz51xzotC2Wspoj1gS4/7vkSVgSmvE12S zcIpjt7KVetZc3IVFyxSt6VFmcKrkKr1q3CZlr22nZIlfWoIPuCElYNlDqgJT8WSO+Hj6V 6qCE8v66Y+nONghAN08I+02GjKr7soSA55VMsJ6WQfmcvozF0Zd4sRg8tTlLPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707001915; a=rsa-sha256; cv=none; b=S5XSrdSNzE5iGIwjuzYrr1Bh/YOpctfnF7a39lf3W56S+AWQ9KSCo+xgrIqMIBCwQ095Jz ugj5ZIhCqD2/ScIdJ2Caw3YWWRAfb7CAd1lIIDdODlGU6Plz13VgZ5EXZDeI92KSSjCgE+ z5aaj59c0xT+HoXBrhvCL+HXGzaEV+q5pjDO4e+b2Zne+fiYSpQuEp+bF2nIVQOe676iJa STG5P8lMhP28MMNny2AOZYlMHa+EEiq6oYoIbj0+G7Nq+c7pML4m6dU4LLZxF/KTmebsEz /4ZTzDzCd4WrRMQqNGAJFrIRT2Ht3EER6HjxOc6dZyA76/HkDzmI6to7PwzjjQ== 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 4TS7gv3qnpzYxb; Sat, 3 Feb 2024 23:11:55 +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 413NBt5B095279; Sat, 3 Feb 2024 23:11:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 413NBt9l095276; Sat, 3 Feb 2024 23:11:55 GMT (envelope-from git) Date: Sat, 3 Feb 2024 23:11:55 GMT Message-Id: <202402032311.413NBt9l095276@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: 1e75e61d5c2c - main - bsdinstall: Fix broken netconfig persistence for installed system 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: 1e75e61d5c2c34ddaf7bfbdba02e00670f9bf231 Auto-Submitted: auto-generated The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=1e75e61d5c2c34ddaf7bfbdba02e00670f9bf231 commit 1e75e61d5c2c34ddaf7bfbdba02e00670f9bf231 Author: Jessica Clarke AuthorDate: 2024-02-03 22:50:47 +0000 Commit: Jessica Clarke CommitDate: 2024-02-03 22:50:47 +0000 bsdinstall: Fix broken netconfig persistence for installed system The replacement of echo >> with sysrc -f used sysrc key value, which means "read variables key and value" and thus did nothing useful (and in fact emitted errors to the log about neither existing). Instead use the correct sysrc key=value form so the installed system comes back up with working networking. Fixes: 60b37735f305 ("bsdinstall netconfig: avoid duplicate entries in rc.conf") --- usr.sbin/bsdinstall/scripts/netconfig | 4 ++-- usr.sbin/bsdinstall/scripts/netconfig_ipv4 | 2 +- usr.sbin/bsdinstall/scripts/netconfig_ipv6 | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/netconfig b/usr.sbin/bsdinstall/scripts/netconfig index 58fbe1883d40..77b71867eb4a 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig +++ b/usr.sbin/bsdinstall/scripts/netconfig @@ -82,7 +82,7 @@ exec 5>&- IFCONFIG_PREFIX="" if is_wireless_if $INTERFACE; then NEXT_WLAN_IFACE=wlan0 # XXX - sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net wlans_$INTERFACE "$NEXT_WLAN_IFACE" + sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net wlans_$INTERFACE="$NEXT_WLAN_IFACE" IFCONFIG_PREFIX="WPA " if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then ifconfig $NEXT_WLAN_IFACE create wlandev $INTERFACE @@ -116,7 +116,7 @@ fi # In case wlanconfig left an option and we do not support IPv4 we need to write # it out on its own. We cannot write it out with IPv6 as that suffix. if [ ${IPV4_AVAIL} -eq 0 -a -n ${IFCONFIG_PREFIX} ]; then - sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net ifconfig_$INTERFACE "${IFCONFIG_PREFIX}" + sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net ifconfig_$INTERFACE="${IFCONFIG_PREFIX}" fi if [ ${IPV6_AVAIL} -eq 1 ]; then bsddialog --backtitle "$OSNAME Installer" --title 'Network Configuration' \ diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 index 9097a1f9617c..8f747a9d0162 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv4 @@ -63,7 +63,7 @@ if [ $? -eq $BSDDIALOG_OK ]; then exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}" fi fi - sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net ifconfig_$INTERFACE "${IFCONFIG_PREFIX}DHCP" + sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net ifconfig_$INTERFACE="${IFCONFIG_PREFIX}DHCP" exit 0 fi diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 index 99ec379197fb..b851069eee14 100755 --- a/usr.sbin/bsdinstall/scripts/netconfig_ipv6 +++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv6 @@ -73,7 +73,7 @@ while : ; do continue fi fi - sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net ifconfig_${INTERFACE}_ipv6 "inet6 accept_rtadv" + sysrc -f $BSDINSTALL_TMPETC/._rc.conf.net ifconfig_${INTERFACE}_ipv6="inet6 accept_rtadv" exit 0 else break