Date: Sun, 7 Sep 2014 11:28:11 +0200 From: "O. Hartmann" <ohartman@zedat.fu-berlin.de> To: Scot Hetzel <swhetzel@gmail.com> Cc: FreeBSD CURRENT <freebsd-current@freebsd.org>, FreeBSD Ports <freebsd-ports@freebsd.org>, Erich Dollansky <erich@alogt.com> Subject: Re: service doen't get started at boottime, but can start manually Message-ID: <20140907112811.5570fc85.ohartman@zedat.fu-berlin.de> In-Reply-To: <CACdU%2Bf_fby%2BKUUWTEDJrcPSdTdYNx=c2-WMG-pP%2BeR8peuXwiQ@mail.gmail.com> References: <20140907090321.12bbc428.ohartman@zedat.fu-berlin.de> <20140907153342.2366ad8b@X220.alogt.com> <20140907094308.6c466d9f.ohartman@zedat.fu-berlin.de> <CACdU%2Bf_%2BB353Hyv2cHir=Jp53MZoKsFeu4i=spDKEAgsjHmcVQ@mail.gmail.com> <CACdU%2Bf_fby%2BKUUWTEDJrcPSdTdYNx=c2-WMG-pP%2BeR8peuXwiQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/Ojp/xHrD0bzl6YWtKo1LaOY Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Sun, 7 Sep 2014 04:03:25 -0500 Scot Hetzel <swhetzel@gmail.com> schrieb: > On Sun, Sep 7, 2014 at 3:39 AM, Scot Hetzel <swhetzel@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. >=20 > /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: >=20 > files=3D`rcorder /etc/rc.d/* ${local_rc}` >=20 > to get the startup order for these scripts. Then /etc/rc starts the > scripts in the proper order. >=20 > Since, /usr/local/etc/rc.d/refdb{,.sh.dist} is missing the "# PROVIDE: > ", the script is skipped on startup. >=20 > Since, rc.d/refdb is not a proper rc script, adding refdb_enable=3DYES > to /etc/rc.conf{,.local} will not control the starting of this script. >=20 > 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 goo= d 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/.=20 Since the original refdb.sh init script targets both Linux and *BSD and del= egates 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 th= e 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 alread= y prepared for the refurbishment of the port. Oliver --Sig_/Ojp/xHrD0bzl6YWtKo1LaOY Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJUDCUsAAoJEOgBcD7A/5N8nckH/A8VZt5HQq58Bh7+lY01rs47 2/7jBCn8N9hKerIeqygYRTODHn+OD2IWStm0tdESF5wrrl8U754rgPoa7G2gqQvV 8Bsw3F4c1ZpEzDni1MZs3c0lmUNcPY34DZjm4Cs9Jur5hgWm4qdpTZNBt992tXdS PIiqmKVS2whgSU/wFiXD+qEVnNhyEFmyfCAZS5sZ10SN+Wy/bLXXIhbnJUaxkz7T nImNMoHvW8NAEqjA00yf1Vz1vMuOtYQojL0nCdPs2AsWkAYa4GdNli7BO/o0isq3 6Op39Zz6/XIbO7oYO3XTuBpm6qjpGNtMoKmyQ5ywZu1fDC6B1HEKVa2FDd1bjag= =Gq/G -----END PGP SIGNATURE----- --Sig_/Ojp/xHrD0bzl6YWtKo1LaOY--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140907112811.5570fc85.ohartman>