From nobody Tue Nov 29 03:41:49 2022 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 4NLp6j4X6kz4jmlF; Tue, 29 Nov 2022 03:41:49 +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 4NLp6j44cDz4Jj1; Tue, 29 Nov 2022 03:41:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669693309; 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=JWZN3kjq0B5uCK9BCIXZ9NNPIEvJUNim+XNfFgXhSt8=; b=YWVNj/FWLt9GLE+/xuSaDM6vzdF4uvYY8N8iockkex+ady+kmXeHaebnIDNLU+sCuT2Kz/ Y+y0ORNoDDIsxhuGaxxyKefHHEo2OPNTSzSi37OlEVGtwU9N++hfg/tRu/6IeYo1dANKE8 N2mzgWRNxOaoFCGkE+F52Eqi1M2ONDdFr22Ilw/2STbs2PbtIGJVEh0HmyL/quPeDQ7288 5B+et/Hie0qee9EE9tL+4CvUbt6WH6Cxau+775T6eBc725HLnFvBvVo9qNsL0HeT/2hmdV WbP8BmJT68a8/sbxDlOIeEMlnsuEVzuk74ZxTVBmaDPVca/7kV6Ki7Sr4CgmhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1669693309; 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=JWZN3kjq0B5uCK9BCIXZ9NNPIEvJUNim+XNfFgXhSt8=; b=Ql+0TnjfZtUye5wynIAthMHmLgzDpr/dF0D3oHTvQ6hDQ9rrYx5L+KgvFVuo7qKZDqTKCz 4/fhm9vGNnjyXCRhC85rS8NLcIcvOLOpvdH0ZR9L1eNU7vqzADECeXkpamg1FiTokHFgaN j6RI4oE8Wjc8Fq1ErJCm0U0VKvKmbN4KMNU+H8RC1P1HHT/1qt/tz3IgmjqxgnqRWa90d3 vdaSeZ9TCpR3/1FpkgSwnbFoAOXm7pde/VMcUK0Ebv+aCuXv6FdtrZ12BmsKIhcboCoLPv l8NVv+PIkapRBDW6URsx46xhtgPc3H4dJN7YcUqYpGqceBJy5y//W6KY+mo8EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1669693309; a=rsa-sha256; cv=none; b=MOphJ49T34GQtF9EDwHFVi2TLVW5x5mZrWWPeHDU8wQ6yu5wbVQumjtigBTRv64ua+5NFS kaTUd4A2kB5WlHmOcRoJ+AYOTS6waxhQa6TcsBD5UBzTW3ZNF1MYBY7wEJ2tvGODQXq+Du mBpDAbRbLpiwstrkBwErVNWgqLgfUU9VtE7pmzFJh/o5Y5hd+Rc0jmxQ1Fqp7fC8NlGdSR m/iG+ELQqMkdbT3vcwcJbRziJKkYWLrfPh7kBRxtKXQYjW6wt35QRlRWpjQ6+CUL5xCKSI TEKTc/WYW/TWR5cnE02R2YAJY46xyqRhpGxFlKdEVctl5Lq1Q3AELU6mLqRuDA== 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 4NLp6j37s6z130Y; Tue, 29 Nov 2022 03:41:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2AT3fnoX059154; Tue, 29 Nov 2022 03:41:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2AT3fnWB059153; Tue, 29 Nov 2022 03:41:49 GMT (envelope-from git) Date: Tue, 29 Nov 2022 03:41:49 GMT Message-Id: <202211290341.2AT3fnWB059153@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: 1843da3edb2f - main - bsdinstall: Fix ntpd_sync_on_start service option 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: 1843da3edb2fa64384d06698ffcd62a3bdff4f7f Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=1843da3edb2fa64384d06698ffcd62a3bdff4f7f commit 1843da3edb2fa64384d06698ffcd62a3bdff4f7f Author: Jessica Clarke AuthorDate: 2022-11-29 00:57:38 +0000 Commit: Jessica Clarke CommitDate: 2022-11-29 03:33:47 +0000 bsdinstall: Fix ntpd_sync_on_start service option This installer option is currently totally useless, as it ends up creating an ntpd_sync_on_start_enable="YES" entry in rc.conf, not an ntpd_sync_on_start="YES" entry, as is the correct name. This can also be noticed by revisiting the services menu, which parses the previously written rc.conf.services file to set variables governing the default menu entry values so that selecting OK regenerates the same file, as the menu entry will use the correct variable name and thus think the entry was not selected last time, defaulting back to off and losing the setting. Thus, add a special case in the loop for this option. The only other entry that doesn't follow the *_enable pattern is dumpdev (even moused does, it just also sets a second variable), but that also deviates in terms of being explicitly set either way and using AUTO rather than YES, hence why ntpd_sync_on_start follows a different pattern here and is special-cased rather than introducing a whole new variable that governs behaviour outside the loop. Fixes: c153a35bfd71 ("bsdinstall: replace ntpdate by ntpd_sync_on_start") --- usr.sbin/bsdinstall/scripts/services | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/services b/usr.sbin/bsdinstall/scripts/services index bfb3a07d48f0..44d7c5f138e6 100755 --- a/usr.sbin/bsdinstall/scripts/services +++ b/usr.sbin/bsdinstall/scripts/services @@ -68,7 +68,12 @@ havemouse= for daemon in $DAEMONS; do [ "$daemon" = "dumpdev" ] && havedump=1 continue [ "$daemon" = "moused" ] && havemouse=1 - echo ${daemon}_enable=\"YES\" >> $BSDINSTALL_TMPETC/rc.conf.services + if [ "$daemon" = "ntpd_sync_on_start" ]; then + rcvar=${daemon} + else + rcvar=${daemon}_enable + fi + echo ${rcvar}=\"YES\" >> $BSDINSTALL_TMPETC/rc.conf.services done if [ ! "$havemouse" ]; then