Am Sun, 7 Sep 2014 04:03:25 -0500 Scot Hetzel <swhetzel_at_gmail.com> schrieb: > On Sun, Sep 7, 2014 at 3:39 AM, Scot Hetzel <swhetzel_at_gmail.com> wrote: > > I had a look at scripts/refdb.in, it is not a proper rc script for > > FreeBSD, as it is missing several keywords: > > > > # PROVIDE: <- all scripts need this > > # REQUIRE: > > # BEFORE: > > # KEYWORD: <- optional > > > > Which tells rcorder where to put refdb in the startup order. Since > > these are missing, rcorder doesn't place it in the startup list. > > > I looked again, and it is not rcorder, it's /etc/rc and /etc/rc.subr > that determine which script to run. > > /etc/rc calls find_local_scripts_new from /etc/rc.subr. > find_local_scripts_new checks each rc script to make sure that they > have at least a "# PROVIDE: " keyword. If it does, then it adds that > script to ${local_rc}. Then /etc/rc runs: > > files=`rcorder /etc/rc.d/* ${local_rc}` > > to get the startup order for these scripts. Then /etc/rc starts the > scripts in the proper order. > > Since, /usr/local/etc/rc.d/refdb{,.sh.dist} is missing the "# PROVIDE: > ", the script is skipped on startup. > > Since, rc.d/refdb is not a proper rc script, adding refdb_enable=YES > to /etc/rc.conf{,.local} will not control the starting of this script. > > Someone should fix service, so that it checks the rc script has a "# > PROVIDE: ", and displays an error message if it doesn't. Hello Scott, as the new maintainer of this port, I'm working on a solution, but first, I have to understand the way this obscure rc-script system works. Thanks for your good explanation. I tried to put PROVIDE/REQUIRE in the script, but I also changed refdb.sh -> refdb which, in the end, didn't work. The service IS started with refdb.sh in rc.d/. Since the original refdb.sh init script targets both Linux and *BSD and delegates the starting, stopping et cetera to a script called refdbctl, the latter script needs to be examinded and as far as I understand, most of its functionality is covered by /etc/rc.cubr, except the part where refdbctl searches for the path of the PID file and replaces the init/default path its configuration counterpart found in <prefix>/etc/refdb/refdbdrc. I guess, at the end FreeBSD doen't need the templated refdbctl/refdb.in (to be found in the sources in scripts/). If you'd like to have a look at it, I can send you the sekelton I've already prepared for the refurbishment of the port. Oliver
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:51 UTC