Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Feb 2021 14:37:36 +0000
From:      bugzilla-noreply@freebsd.org
To:        rc@FreeBSD.org
Subject:   [Bug 248865] rc scripts in /usr/local/etc/rc.d/ may be ignored
Message-ID:  <bug-248865-20181-dNia2eY4vb@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-248865-20181@https.bugs.freebsd.org/bugzilla/>
References:  <bug-248865-20181@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D248865

Cy Schubert <cy@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cy@FreeBSD.org
           Assignee|rc@FreeBSD.org              |cy@FreeBSD.org

--- Comment #3 from Cy Schubert <cy@FreeBSD.org> ---
The rc(8) man page says:

     Each script should contain rcorder(8) keywords, especially an appropri=
ate
     "PROVIDE" entry, and if necessary "REQUIRE" and "BEFORE" keywords.

A scan of rc scripts shows that many of the ports I have installed don't ha=
ve
PROVIDE.

slippy$ grep -c PROVIDE /etc/rc.d/* | grep :0=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20
slippy$ grep -c PROVIDE /usr/local/etc/rc.d/* | grep :0
/usr/local/etc/rc.d/cvsupd.sh:0
/usr/local/etc/rc.d/fwlogwatch.sh.sample:0
/usr/local/etc/rc.d/racoon2:0
/usr/local/etc/rc.d/ssyncd.init:0
/usr/local/etc/rc.d/tdetect.sh:0
/usr/local/etc/rc.d/vboxtoolinit:0
/usr/local/etc/rc.d/zzz-jail.sh:0
slippy$=20

Note that racoon2 is provided by the upstream software, written by a NetBSD
committer. RCNG was a NetBSD idea.

And the scripts with no keywords are either invalid or=20

slippy$ egrep -c 'PROVIDE|REQUIRE|BEFORE|KEYWORD' /usr/local/etc/rc.d/* | g=
rep
:0
/usr/local/etc/rc.d/cvsupd.sh:0
/usr/local/etc/rc.d/fwlogwatch.sh.sample:0
/usr/local/etc/rc.d/ssyncd.init:0
/usr/local/etc/rc.d/tdetect.sh:0
/usr/local/etc/rc.d/vboxtoolinit:0
/usr/local/etc/rc.d/zzz-jail.sh:0
slippy$=20

Much of this is not provided by the port but the upstream tarball. Now it
becomes an issue for the greater community, not just you or me, whether we
relax the rules and do no checking whatsoever or enforce some arbitrary rule
that each rc script must have at least one keyword.

I think the best path forward is to start a discussion on freebsd-arch beca=
use
we will have the largest audience there, and point to a phabricator revision
with a proposed solution. I'm of the opinion to print out a warning using
logger(1) but run or not run the script based on some arbitrary rc.conf
setting. This avoids a POLA violation since those scripts were never execut=
ed
in the first place. But to execute them is also a POLA violation, Both defa=
ults
would be a POLA violation but which would be worse?

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248865-20181-dNia2eY4vb>