From nobody Tue Sep 30 06:04:10 2025 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 4cbSDp6Vgkz68VRN; Tue, 30 Sep 2025 06:04:10 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cbSDp5ZkCz3wB2; Tue, 30 Sep 2025 06:04:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759212250; 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=+0BvLDD+XI3M3q3/WkmEApEtJJOjBgMpTbxYym6W8kU=; b=xKurOKm1cOEoDdF1TQ0LtRuEbcWCyyB6B7XvwlbzYVlf4SjBq2iCsy4vNAtIYyOX/r1T0u II3bNpzkc+aShjyPyYy5DlahFA11uYUGMh6Q06kuYLrE94UO84V0h4KjH9Vuttqcgde/C9 Ppo38LoAinbWCEQo0D5Dx2z41YSYhRKaH4S+IaEVcZUj9vkYRnLbCSN24hPz99hwu8Drt/ u3QSUpQbyeUOEokNL0tPK4VSY0X+ZegaB6PMle/bf/3AEhRm4HFuxZHq6yq5k2xCVPvULJ CkGyrm/wJfAjgNm4s0PR8DuNSVI1irmHM5eylJcgw4Cl1bPkFg8LNZrnfHHLxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1759212250; 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=+0BvLDD+XI3M3q3/WkmEApEtJJOjBgMpTbxYym6W8kU=; b=yjA4U9vC8xOE0xFzcKMESGcORGoqxyJ/mpYfkSNFZFt5ZkniNN1HgAAOViOatK61BJGROi jSlQLOMThLRKtOFsF5U0JDjrA7n1K041aW+3Kj/qU1lgENbdI+YLh0NC67SFPZ4ZG77vxI CxMMGfnZZ8bie8bCvRa7HLzD83+PQro1uvS4LLlL8o8QfOtQAMl5rqLmTHWFrj19ntRVYh LXNWueAbdOYHKfst+l4z6x0g5vzTjMD2GZjMj7kfoV7yk++KbWWsez13HsHzGHKqOvaD9Y BK2FUrMVIVIEGL3/JUabqwaMqmmZJ8/3JVpzRlFOohSxpvypbpM+3I4AZ40XDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1759212250; a=rsa-sha256; cv=none; b=t0foC9ZxazvNAivwyhPBG3uaeEku5d6LsDQ8vc9BOSmYZfcU2Je005VWhLS+CSZYT6SYRf w01O0z76E66DMcvcTPozFc4eFPcbeKq0Xeg396of6Xxh/BApSq89X1aV/VTcsypFC2WPRM kbeLvHusjSxykaoMXX3Go6CwcKVBPnTHn3mP+PCp/dhXZCH/aPWE8kGvgnEsQCCZWzX44V DD0MgDm0A79nWzkOIpsoEMdp/X/vTf5jNCsUvWe6hzYr2r3P1J26p3UD1EQVX9SJn5TWXJ E6BrdQyKkVumVQIGsyl+4z6CNNGLnH1Y0XE8qZpi02/x+Dwg1/eHisZTOvg02w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cbSDp4yfZz7pn; Tue, 30 Sep 2025 06:04:10 +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 58U64A0X077758; Tue, 30 Sep 2025 06:04:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58U64A6B077755; Tue, 30 Sep 2025 06:04:10 GMT (envelope-from git) Date: Tue, 30 Sep 2025 06:04:10 GMT Message-Id: <202509300604.58U64A6B077755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 2507698b630d - main - bsdinstall: Only offer to enable services which are installed 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2507698b630db3d88b0aab12c348873f827255a2 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=2507698b630db3d88b0aab12c348873f827255a2 commit 2507698b630db3d88b0aab12c348873f827255a2 Author: Lexi Winter AuthorDate: 2025-09-30 06:02:51 +0000 Commit: Lexi Winter CommitDate: 2025-09-30 06:02:51 +0000 bsdinstall: Only offer to enable services which are installed With pkgbase, users may decide to install a minimal set of packages that's missing some daemons. Check which services are installed, and only include the ones which are present in the dialogue. MFC after: 1 day Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D52646 --- usr.sbin/bsdinstall/scripts/services | 49 ++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 13 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/services b/usr.sbin/bsdinstall/scripts/services index 93282effbb3f..110b6f321ed1 100755 --- a/usr.sbin/bsdinstall/scripts/services +++ b/usr.sbin/bsdinstall/scripts/services @@ -40,21 +40,44 @@ fi echo -n > $BSDINSTALL_TMPETC/rc.conf.services +DAEMON_OPTIONS="" + +if [ -x "${BSDINSTALL_CHROOT}/etc/rc.d/sshd" ]; then + DAEMON_OPTIONS="$DAEMON_OPTIONS \ + sshd \"Secure shell daemon\" ${sshd_enable:-off}" +fi + +if [ -x "${BSDINSTALL_CHROOT}/etc/rc.d/ntpd" ]; then + DAEMON_OPTIONS="$DAEMON_OPTIONS \ + ntpd \"Synchronize system and network time\" ${ntpd_enable:-off} \ + ntpd_sync_on_start \"Sync time on ntpd startup, even if offset is high\" \ + ${ntpd_sync_on_start:-off}" +fi + +if [ -x "${BSDINSTALL_CHROOT}/etc/rc.d/local_unbound" ]; then + DAEMON_OPTIONS="$DAEMON_OPTIONS \ + local_unbound \"Local caching validating resolver\" \ + ${local_unbound_enable:-off}" +fi + +if [ -x "${BSDINSTALL_CHROOT}/etc/rc.d/powerd" ]; then + DAEMON_OPTIONS="$DAEMON_OPTIONS \ + powerd \"Adjust CPU frequency dynamically if supported\" \ + ${powerd_enable:-off}" +fi + +if [ -x "${BSDINSTALL_CHROOT}/etc/rc.d/moused" ]; then + DAEMON_OPTIONS="$DAEMON_OPTIONS \ + moused \"PS/2 mouse pointer on console\" ${moused_enable:-off}" +fi + exec 5>&1 -DAEMONS=$( bsddialog --backtitle "$OSNAME Installer" \ - --title "System Configuration" --no-cancel --separate-output \ - --checklist "Choose the services you would like to be started at boot:" \ +DAEMONS=$(eval bsddialog --backtitle \"$OSNAME Installer\" \ + --title \"System Configuration\" --no-cancel --separate-output \ + --checklist \"Choose the services you would like to be started at boot:\" \ 0 0 0 \ - local_unbound "Local caching validating resolver" \ - ${local_unbound_enable:-off} \ - sshd "Secure shell daemon" ${sshd_enable:-off} \ - moused "PS/2 mouse pointer on console" ${moused_enable:-off} \ - ntpd "Synchronize system and network time" ${ntpd_enable:-off} \ - ntpd_sync_on_start "Sync time on ntpd startup, even if offset is high" \ - ${ntpd_sync_on_start:-off} \ - powerd "Adjust CPU frequency dynamically if supported" \ - ${powerd_enable:-off} \ - dumpdev "Enable kernel crash dumps to /var/crash" ${dumpdev:-on} \ + $DAEMON_OPTIONS \ + dumpdev \"Enable kernel crash dumps to /var/crash\" ${dumpdev:-on} \ 2>&1 1>&5 ) retval=$? exec 5>&-