Date: Mon, 24 Aug 2020 04:23:09 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 248865] rc script in /usr/local/etc/rc.d/ may be ignored Message-ID: <bug-248865-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=248865 Bug ID: 248865 Summary: rc script in /usr/local/etc/rc.d/ may be ignored Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: unitrunker@gmail.com rc.subr uses grep to look for rc scripts with '^# PROVIDE:' See "find_local_scripts_new" and "find_local_scripts_old". RC scripts in /usr/local/etc/rc.d/* without the "# PROVIDE:" clause are ignored by /etc/rc. I think this is a mistake. Per the docs, the "PROVIDE" clause is optional. This is certainly the case for rc scripts in base (eg. /etc/rc.d/). To fix this, either ... 1. Update the docs (see bug https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=121440). Note that an empty "# PROVIDE:" clause will work. Only scripts under /usr/local/etc/rc.d/ are affected by this quirk. ... or ... 2. Update rc.subr to detect scripts that contain ANY of the well-known rc script clauses: PROVIDE, REQUIRE, BEFORE, or KEYWORD (or some other heuristic to detect a valid RC script). In any case, the documentation should be updated to say that - because /usr may not yet be mounted when /etc/rc first runs, scripts under /usr/local are not visible. Such scripts are run in a second pass made by /etc/rc (after the root file system has been made read-write). This has the same effect as adding ... # REQUIRE: FILESYSTEMS ... to any RC script under /usr/local/etc/rc.d/ The reason is /etc/rc only runs scripts up to and including FILESYSTEMS in the first pass. -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-248865-227>
