From nobody Wed Feb 28 07:18:20 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 4Tl5L51KZzz5CpsV; Wed, 28 Feb 2024 07:18:21 +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 4Tl5L50n5rz43LD; Wed, 28 Feb 2024 07:18:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1709104701; 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=5eTkC1ClR3crUkrRHHPljiCpCbO0qPQNjYywIDNB1go=; b=qMbWPHOM6xKX82SEZ2sqlKgn0JulR1ZDODz768tIRKEzmBLPPt4mYB4OPkwX4ZYwcCqz8+ 51H17mOcwgUczxLlfzF0uPg9zpTBLHbB++j66f9uRW0EWOrPLeUhqINErq8b/WJHpazIzD 2CHzNgzOL2TdVJjMOztfY0dH3IgN6lg44kKXpwLl/oXV9O4ju94YXPLXzZHOVl36zJtuez EyYF2qObXZ8+1fclC6H0iW7c+rYK0w0fTtDeokIIM78pzLzhRWNjIXJbrMNLs3Q4dK4mrv vZa7U7OB8ihrVwiQz+l8GLIKqhjwE6zJohgssMeMlRLhKMXast99F2411cj8Fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1709104701; a=rsa-sha256; cv=none; b=SwiP2hT4uOAF7VBnex2hrNXjHImm6c9UHYtvNTwQoDBH2vJOXSh1uBVMIbcwZjLV2JoqaD JsmHzg8WaQnpjatmLvPMJ8o+a0sw/lEL+kriXYkKsDWL/S3SCV1wvBTNv14sBgOKD4miBu GstSgBczFeKSSpkNixS+dvifuV+s9qYuZzVtsfPLinZfK9r/XH6PZDVGNJkSlz5npbpP1Z g0WpEE7VmWg4fPqjtj1dgPhBnpkAjKd4sl8wgnOhr5GEweJHrxlc6yGRgE2ROKgH2W/vEu 4mhPD6YuHZANiIAgQEzYvnKdYqYbB6r9WKCKqADtOFGHamoDsxBd4E56AcQhgA== 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=1709104701; 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=5eTkC1ClR3crUkrRHHPljiCpCbO0qPQNjYywIDNB1go=; b=ax5+ZrZIG3n8eg9z4HWnlSafYYINHg3YdcJNsWGDy6TJHUD9g3T3RX5NnwrRrYQ0OfKM0V QlxEzL0fB2WS2QF4YY79ksD62oykFuHZSjhKvO9007Iu6sdEX9dRwDnjmc8YBSr+5HY9Bq Bx+OhL0cPbGLdXt0wLfMCNA4rhnHTuPAgmYhf7JXTbUHs/s5XlCzEZpfcbt3C2N1qrjIyP /6OFmR+loAHm9xAfWU2DIcbyN/COtJscMVJuwfEnMVetoU44Tc1y02Py+FzrcYVq4M+n6o d0Wwl3Q4qZDb/czme0QEiIGZk+P8dEmcXGe9X3Yq/XvJYTePqFpfm++PJ1I0aA== 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 4Tl5L46yFDznmD; Wed, 28 Feb 2024 07:18:20 +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 41S7IKL6057286; Wed, 28 Feb 2024 07:18:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41S7IKOX057283; Wed, 28 Feb 2024 07:18:20 GMT (envelope-from git) Date: Wed, 28 Feb 2024 07:18:20 GMT Message-Id: <202402280718.41S7IKOX057283@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 72b045386dd3 - main - 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: 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 72b045386dd3db8b31ec3067cb9e160cbd1cfbc6 Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=72b045386dd3db8b31ec3067cb9e160cbd1cfbc6 commit 72b045386dd3db8b31ec3067cb9e160cbd1cfbc6 Author: Emmanuel Vadot AuthorDate: 2024-02-27 17:33:52 +0000 Commit: Emmanuel Vadot CommitDate: 2024-02-28 07:17:58 +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 --- 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 20f0a6375a9e..2fa3b676cb38 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