From nobody Sat Jun 10 18:26:43 2023 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 4Qdmcg3gwXz4cJ0G; Sat, 10 Jun 2023 18:26:43 +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 4Qdmcg3CGZz463Y; Sat, 10 Jun 2023 18:26:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686421603; 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=GxX7bnOr8QiPGUNqG/Z9uBT9tB5TEgRwGL2YPG0RgXY=; b=PIGouiasBOg+0uFtgkNVDHAOaJgFImwAcY5D2depqOFYTa1BR2yIiDZHKgeh6Y97XfLyrb Of6MdpS+n29tnJvlphKYQu8RA6Ak5mQhgRimb2DAgQa/mjhQvleV/PQAqcTCHmR129fIIa drr5nzZ8kittlC0jntljM6z78LGEcA1un4U7zid2graLqHj4xsQEfJ+BNDKX4lQVbp/T5N v1VDPJokU9SMFMG5LxFnGJsB5z1DE4iWsYMKl5Ab7l2GupMr+yPXYY/j1945phW2Fkmgq/ CG3R0iGLlHVEZ1UvKvI5rwH/t+sPRmB6jSBrQ5RyIK9MeoWuYT2d/S1b7ABDNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686421603; 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=GxX7bnOr8QiPGUNqG/Z9uBT9tB5TEgRwGL2YPG0RgXY=; b=Rn2/Skx0u8NOVfN4D4WJC55AJFTnK9esM1wkCgkz+BJg+wZ7wSoVIxkf1qHdRDpcFFEyKr PSEZVad+Qjhhjc1tnuH/s0SJvqwCPFYpfXe4Hj7UwQq6jtb2y9EqNU8wazJMcadMi6hE18 ICDNQIi+lmUeGmDN8hUfBBE4xQA3GFY5r0JI5HUYC8mKIR+FuGGXgi3TaIxm/4jaC2gBkI e9DsIfGMlHMBRgdHHvfj56KQ9Tkra+gBefyCMPh05KbDyTTK2k5woTN8Z2TZSxQAbSbjWh BlM6FXzivO/+j0MemPrdxNRpMcDaFkGTA3e2GQVmCrVRgwGSvoXAfoVUFYgpKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686421603; a=rsa-sha256; cv=none; b=JaHzExTnLNsRTd4bfvjmkaL5DaqujVBDvxK60dGUD1CaCVsrykfZomxvBnAPpOXRXs7lzA yRNfPi6kyZyuXGf06ZwR3t8IT9J1KlK6fixx8KBOTCtFMx+m4/FNfkkeMpyCIA5wuBIl1g Uk/2rAeUO1mo/Pmgh1ShOfynMle7EM9khNsHu9KlJ1WqyKSd2054kyl3EZpPXeNcmBmOy7 WyfozNC4C71v/Rqctkx/bmVkw+gbqLceEOYSb6PxLhS9zoWIYdUIUgd51KQ08jfskZgcTm BobE0U1kH3mQaSD/+EVwSdjX9MbngMbP82hSysAH0s/o84QV57iURRhGXZbPgQ== 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 4Qdmcg2FYKzRnZ; Sat, 10 Jun 2023 18:26:43 +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 35AIQhSm098921; Sat, 10 Jun 2023 18:26:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35AIQh3r098920; Sat, 10 Jun 2023 18:26:43 GMT (envelope-from git) Date: Sat, 10 Jun 2023 18:26:43 GMT Message-Id: <202306101826.35AIQh3r098920@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Graham Perrin Subject: git: fedfe274225a - stable/12 - rc(8): document how to reload rc's configuration 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: grahamperrin X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: fedfe274225a60a9c7e3894b245027caab92470a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=fedfe274225a60a9c7e3894b245027caab92470a commit fedfe274225a60a9c7e3894b245027caab92470a Author: Mina Galić AuthorDate: 2023-06-02 18:01:03 +0000 Commit: Graham Perrin CommitDate: 2023-06-10 18:23:06 +0000 rc(8): document how to reload rc's configuration The fact that rc(8) only reads its configuration once is in the man page, but how to trigger a reload is only in the code. Discovered while trying to make cloud-init disable and stop syslogd. Thanks to RhodiumToad for providing the words. Reviewed by: debdrup, grahamperrin Approved by: grahamperrin, imp Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D40329 (cherry picked from commit 0981275c75d5678172eb9dd8fbc89ef61c05c979) --- share/man/man8/rc.8 | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/share/man/man8/rc.8 b/share/man/man8/rc.8 index ebd28cd85c2a..ebffeca09d63 100644 --- a/share/man/man8/rc.8 +++ b/share/man/man8/rc.8 @@ -31,7 +31,7 @@ .\" @(#)rc.8 8.2 (Berkeley) 12/11/93 .\" $FreeBSD$ .\" -.Dd July 4, 2022 +.Dd June 1, 2023 .Dt RC 8 .Os .Sh NAME @@ -124,10 +124,9 @@ to load various .Xr rc.subr 8 shell functions to use. .It -Load the configuration files. +Load the configuration files (see below for reloading). .It -Determine if booting in a jail, -and add +Determine if booting in a jail, and add .Dq Li nojail (no jails allowed) or .Dq Li nojailvnet @@ -367,6 +366,17 @@ the command name (see the .Sx EXAMPLES section). .Pp +The configuration files are normally read only once at the start of a boot +sequence; if a script needs to +.Cm enable +or +.Cm disable +any other script that would run later in the sequence, it must send a +.Dv SIGALRM +to the rc process (identified by +.Ev $RC_PID ) +to have it re-read the files. +.Pp The following key points apply to old-style scripts in .Pa /usr/local/etc/rc.d/ : .Bl -bullet