https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248865

Cy Schubert <c...@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |c...@freebsd.org
           Assignee|r...@freebsd.org              |c...@freebsd.org

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

     Each script should contain rcorder(8) keywords, especially an appropriate
     "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 have
PROVIDE.

slippy$ grep -c PROVIDE /etc/rc.d/* | grep :0               
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$ 

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 

slippy$ egrep -c 'PROVIDE|REQUIRE|BEFORE|KEYWORD' /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/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$ 

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 because
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 executed
in the first place. But to execute them is also a POLA violation, Both defaults
would be a POLA violation but which would be worse?

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-rc@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-rc
To unsubscribe, send any mail to "freebsd-rc-unsubscr...@freebsd.org"

Reply via email to