Date: Sun, 7 Sep 2014 04:03:25 -0500 From: Scot Hetzel <swhetzel@gmail.com> To: "O. Hartmann" <ohartman@zedat.fu-berlin.de> 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: <CACdU%2Bf_fby%2BKUUWTEDJrcPSdTdYNx=c2-WMG-pP%2BeR8peuXwiQ@mail.gmail.com> In-Reply-To: <CACdU%2Bf_%2BB353Hyv2cHir=Jp53MZoKsFeu4i=spDKEAgsjHmcVQ@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>
next in thread | previous in thread | raw e-mail | index | archive | help
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. /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. -- DISCLAIMER: No electrons were maimed while sending this message. Only slightly bruised.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACdU%2Bf_fby%2BKUUWTEDJrcPSdTdYNx=c2-WMG-pP%2BeR8peuXwiQ>