From nobody Fri Jun 2 18:29:34 2023 X-Original-To: dev-commits-src-main@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 4QXs3g1zm9z4YP0W; Fri, 2 Jun 2023 18:29:35 +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 4QXs3g1Th1z3s6F; Fri, 2 Jun 2023 18:29:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685730575; 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=KwER5SSN/NHBIZpLPtNijAW5uMlEBrYnzZQIDTWKdFk=; b=f6b4l16uhGilCW1sDp0CL2QmJJJaYwEgEGpVwgODaV6kkxCT62QwXZXkUbi2DkrwS/NNPz KUJnTe0e9j6KExfH76jyBTEc99WNGdld3zWwE/q+vPIrPWKbpvppydMmvOdVkwqejs4X7e /P2sPizJ1OMO9uDvWG10nctHG0sL7Be/pkc3oQ7ghMCIbre6a2rUM2Dkj2RCP9238QKMR6 St/LnmxgEkqGK218ABwthxMYPyEVmGcvOv9b5Ah8dA+S200QD0OUp+nbayYalBpN0OUlF2 GcvRJvOF1ZPSyDMHaITs5am9s36FhDSXwkpDM7uuxZJayrjVoLdhO5Ss9EwZ2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685730575; 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=KwER5SSN/NHBIZpLPtNijAW5uMlEBrYnzZQIDTWKdFk=; b=i/uzcMrtWKR6Bo5O4qfNvm+ImbyRA5285oGSmHIte/5b3MCw4ASHDk8L11Vy+o428cRQbC YV6vF011QcBahQLvHk8lOV+KifoifjpkCo9sMuH7hBEon4u0Xcc9xDWpMqtRBi321SmSO5 3L0A1/4/2BN5ab8o8RCvMH1PBZHAFdKLerMS7awbU3lqHjvT2wOqZ4ODkpquopUH0dorTJ Wwr4f4vVOuIrt9EOYWh20Jmenjkiu2Lfk5BIUrCrPHRnwfPs/2VXf2hjSgTdAByCPDGxx3 1vldbkLJ/byuebJu5IjUliDv2VSrtfR3BHYkdvUwZIE7VBBcVvvtvYgRs6ZxGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685730575; a=rsa-sha256; cv=none; b=l6XwpKnLlQoNSktvTLvPjeujdAXpWyWOkvLVL2oRmjC6U+42XIsUzJHMp107eOJXewt9tH TVkOm9PomyU18kAqLFh2fDkw+KMb7I1DLl6ysE3zIc6P2Y4B45lYRdCduORSb2z4gLAvh1 SLxDTWCvgu3tpVKqzoTVTfhf0OOQajr//qcr3LeeDs8koDdJ9yNFMXxICHllXqSpiWUPV1 Mpn6vPzGx5bjxHsME48dfsRdkosclFLGbk2S+hy3FXzk5bJ/Fk3KQtIzz16SNQLJ7hKAAn LcXuph9TA+4HkUhztItkoVyepEAY8lyH+79IXqsPH16In3PK+xontOis1jUSuA== 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 4QXs3g0XLKz18Rp; Fri, 2 Jun 2023 18:29:35 +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 352ITYna075411; Fri, 2 Jun 2023 18:29:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 352ITYGS075410; Fri, 2 Jun 2023 18:29:34 GMT (envelope-from git) Date: Fri, 2 Jun 2023 18:29:34 GMT Message-Id: <202306021829.352ITYGS075410@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Graham Perrin Subject: git: 0981275c75d5 - main - rc(8): document how to reload rc's configuration List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 0981275c75d5678172eb9dd8fbc89ef61c05c979 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by grahamperrin: URL: https://cgit.FreeBSD.org/src/commit/?id=0981275c75d5678172eb9dd8fbc89ef61c05c979 commit 0981275c75d5678172eb9dd8fbc89ef61c05c979 Author: Mina Galić AuthorDate: 2023-06-02 18:01:03 +0000 Commit: Graham Perrin CommitDate: 2023-06-02 18:27:37 +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 MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D40329 --- 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