From nobody Tue Jun 04 11:39:19 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 4VtpXS42T7z5NJKM; Tue, 04 Jun 2024 11:39:20 +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 4VtpXR4slVz4SKf; Tue, 4 Jun 2024 11:39:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1717501159; 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=HuatuZosXBv2EIe5EVYpKsTEyp253w6WvrJY95fEL6M=; b=w7NEQtHKXhfzNKEOyf7wa/t81ds1w4dXPvNU29r6Qb0hrGHnhn9dcdLrxmSA6HjabRBzga ICJi5T4LTvcyWsexNlwybUIdudsHxVQdcImKbEYzPv1BcXhadY0O2ez/z88YTgL0qjmpc7 hzLbdSFc6gREH132QMzI988QR56V8upwx+ksQ0EuFymVWCqhQ78VkakTm67pdDhgqLINa3 0bmzURb3kIu5wiZaTXmOzIlJXhoLTtZTtnuR5nppz0Ed9glAoam5cBOLKGDvFXI4EDxrUt wE+UcEOQIUR+MzyATEg4YhM7xp9S04OPcJw7sQ/UyxKEw+E/9J5RXNDYgqQAtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1717501159; a=rsa-sha256; cv=none; b=kAz0Y0L5AIoNiPLf1xb0cmQTVsX/hkqi4xR82Nk1pSsZXk5uKogtHEW9NLkSeJ1P7wbDPS VrFKtzfMEszamv3HCCS/me0L7w+X/pI2d4Qt1CbCK7PLI17Ej9TGe8tvp/F6jHiIY8r4NJ bO1Ts1x9zU5Lyy+eTtkCDp3zHUAi2aT/XARLyuJjyJOqFUld6Ixz37s+VYMY1OOryHP6SX gmT7RT/EEJuFmjWmZOoRraELSNM6hAkbnVHtjgT5ZpJeZRvoyKdrxd4w5R52PMLQEv3rHn tJ5fMI2bI5RaUHJohDXGja6boAqKOReRku9oeRVjMOy8EdeyH+bCD98+3Cnyxw== 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=1717501159; 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=HuatuZosXBv2EIe5EVYpKsTEyp253w6WvrJY95fEL6M=; b=OspimQBNfof33pHC6wjsjTB1uiD4vKXS+OXr6+1WrivCz6CESek8TSF+WUMAy4oKb5nkTd rkZFcu+t3b9IIFbZLJ6y7jpr4XTpShd3XOyLdQueuZP0kueN+oUnq00t+qYQM34X61gkia vOtSgEIKAMxlowy/5PVEQYbA1Pn0X8epMJXIwT5JkXObH+p9AuH0H93QObg+zzW8wZ7kOP gGhGU2Z2sUWWYAJ7QagEFRYvl5ia6luxJYGPYWZU6yYXega9wC08EHMKBmUxRnWwVCxMit oe5R5pZr7DL2YOrbBxoAAZ0AqurnYMisntftQjFU+Zvy0riUvXGShTZtFbPn8w== 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 4VtpXR4TLYzH2P; Tue, 4 Jun 2024 11:39:19 +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 454BdJwU013088; Tue, 4 Jun 2024 11:39:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 454BdJPR013085; Tue, 4 Jun 2024 11:39:19 GMT (envelope-from git) Date: Tue, 4 Jun 2024 11:39:19 GMT Message-Id: <202406041139.454BdJPR013085@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: ac658a7c760d - stable/14 - rc: Set var_run_enable to enable by default 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ac658a7c760d9db9fcd11cdeb3b858411dedf754 Auto-Submitted: auto-generated The branch stable/14 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ac658a7c760d9db9fcd11cdeb3b858411dedf754 commit ac658a7c760d9db9fcd11cdeb3b858411dedf754 Author: Emmanuel Vadot AuthorDate: 2024-02-27 17:33:52 +0000 Commit: Emmanuel Vadot CommitDate: 2024-06-04 11:38:54 +0000 rc: Set var_run_enable to enable by default This will load/save the /var/run directories at boot/shutdown if and only if /var/run/ is a tmpfs mount so it is a win for tmpfs users and a no-op for everyone else. Reviewed by: bapt Differential Revision: https://reviews.freebsd.org/D44097 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 72b045386dd3db8b31ec3067cb9e160cbd1cfbc6) --- libexec/rc/rc.conf | 4 ++-- libexec/rc/rc.d/var_run | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/libexec/rc/rc.conf b/libexec/rc/rc.conf index 7f9e67981eec..a7b149bb0cd4 100644 --- a/libexec/rc/rc.conf +++ b/libexec/rc/rc.conf @@ -61,8 +61,8 @@ varmfs_flags="-S" # Extra mount options for the mfs /var mfs_type="auto" # "md", "tmpfs", "auto" to prefer tmpfs with md as fallback populate_var="AUTO" # Set to YES to always (re)populate /var, NO to never cleanvar_enable="YES" # Clean the /var directory -var_run_enable="NO" # Save/restore /var/run structure at shutdown/reboot -var_run_autosave="NO" # Only restore /var/run structure at shutdown/reboot +var_run_enable="YES" # Save/restore /var/run structure at shutdown/reboot +var_run_autosave="YES" # Only restore /var/run structure at shutdown/reboot # The user is expected to issue service var_run save to # manually save the /var/run mtree var_run_mtree="/var/db/mtree/BSD.var-run.mtree" diff --git a/libexec/rc/rc.d/var_run b/libexec/rc/rc.d/var_run index daff06ce1a3f..bf8f0cb737b4 100755 --- a/libexec/rc/rc.d/var_run +++ b/libexec/rc/rc.d/var_run @@ -17,11 +17,6 @@ stop_cmd="_var_run_stop" load_rc_config $name -# Set defaults -: ${var_run_enable:="NO"} -: ${var_run_mtree:="/var/db/mtree/BSD.var-run.mtree"} -: ${var_run_autosave:="YES"} - _var_run_load() { test -f ${var_run_mtree} && mtree -U -i -q -f ${var_run_mtree} -p /var/run > /dev/null