From nobody Sat Jun 10 18:33:11 2023 X-Original-To: dev-commits-src-branches@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 4Qdmm81SWqz4cKJr; Sat, 10 Jun 2023 18:33:12 +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 4Qdmm813H8z47f2; Sat, 10 Jun 2023 18:33:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686421992; 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=NWhUiUaLe0Wu+fZZfFcptf9rtlk6d9jpBSqLnqyT3UI=; b=qlVj1jDVLpajobuJ1lKdbhK/an+NVLya/6iwtAGBrL7b+f/ASvKltZvNcdXQVvHwyNRgQe 9Mxj0Tdw1uMvf6SNmBCNrXzgbMeVZs6o5SjjsPhAOQ/F4q2/V3uTyvyfT9qT3Cz4MIW5HK SLhT7gKcoOhkpiK0Gadw8EIDJr/Ku2c3qxNobzJ02Zrq7TsiLBc6Msr0/zbAh5u6f3ESQw jCn3XOWrEb0F4++zycfUeJUXbGe9z17ySYJY2IvR24PBgTncFdOIBirdUKeeIAaPtHxFog Bv4wnIKMuoc+/t/YpUCHxSaAPUTCiQj84qA8ydHxTk+e6XAsJ0ZjqY4oKQHDnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1686421992; 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=NWhUiUaLe0Wu+fZZfFcptf9rtlk6d9jpBSqLnqyT3UI=; b=mCEH9UvZc6y2K88q/ATy+8Rf2cL9m0PCfX9cMxhoRFteFYsmSymezpPhTOj857C4wW5HKH SJ5R7/JfTKmPrmgjqNOZCAI7/AK6qGzvwVD1tHSa0pt++rPLOSTI9UkrUXRMNis4QEln+g lDPONgq+pzcgZKlB40VKLxTB3BofP0BXfNjuggVeCWXYlyqMx/2XubH0C74H848HBVLqkY 5eo9O1T+mVo/1y0I6x9y5MpR7bxkFJ8r55GXVKb6SNmT6WfCpn/QHFWFaHz/oxO5NcCbt0 ++OMJ8xAh8wWHXnyPozZiTxp+uUKKjArObp/5pMgkTPEvHBB+cS1gDshth+Awg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1686421992; a=rsa-sha256; cv=none; b=R4MmQaZWH+GskvBJED8jzgP2eEtk6AcQtf2o1NUcQPnt20EL1Cclolqkia4TCfuyR5Ntct /aCK1qbcm8q8WlhU87yBELoxfFX/DYGLLbXFZVlNRLAEXmXT17NXB+NjKkdVhjIOfMjl4V vsx2kB7OzSQTvwfF2dHSbnJQYQKM5ugNcX1yuk7hSVjcHg3gBByA4+GnmjwT5ox8P26s2N 7NZQWdlF+ONXCl9rVtjw0EW0v/9wCepZcbMbBFhjRyj8L+f47c0yUNrs7OEc2DMQ+RrCSx aC9kGvHpV/mjbjXD9hNzIwemzkYyhJ4knM1LbsUwUKp7AkhXt4XNr7wogVHxRg== 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 4Qdmm8078zzSQ0; Sat, 10 Jun 2023 18:33:12 +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 35AIXB3E014663; Sat, 10 Jun 2023 18:33:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35AIXBpO014662; Sat, 10 Jun 2023 18:33:11 GMT (envelope-from git) Date: Sat, 10 Jun 2023 18:33:11 GMT Message-Id: <202306101833.35AIXBpO014662@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: 0c2cdf496834 - stable/13 - rc(8): document how to reload rc's configuration List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: 0c2cdf496834490ab25b763ee7cae5d006d39729 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=0c2cdf496834490ab25b763ee7cae5d006d39729 commit 0c2cdf496834490ab25b763ee7cae5d006d39729 Author: Mina Galić AuthorDate: 2023-06-02 18:01:03 +0000 Commit: Graham Perrin CommitDate: 2023-06-10 18:32:15 +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 8b6fc094b7db..14cc83d8e32d 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 @@ -371,6 +370,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