Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Sep 2014 09:53:51 -0500
From:      Scot Hetzel <swhetzel@gmail.com>
To:        Mike Clarke <jmc-freebsd2@milibyte.co.uk>
Cc:        FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: service doen't get started at boottime, but can start manually
Message-ID:  <CACdU%2Bf_1umi_f8=BqUbeUSXkjRfNxbfOHY_b0aQthJnjtFp9bQ@mail.gmail.com>
In-Reply-To: <3855474.cM0CkAr3yg@curlew.lan>
References:  <20140907090321.12bbc428.ohartman@zedat.fu-berlin.de> <CACdU%2Bf_%2BB353Hyv2cHir=Jp53MZoKsFeu4i=spDKEAgsjHmcVQ@mail.gmail.com> <CACdU%2Bf_fby%2BKUUWTEDJrcPSdTdYNx=c2-WMG-pP%2BeR8peuXwiQ@mail.gmail.com> <3855474.cM0CkAr3yg@curlew.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 7, 2014 at 6:16 AM, Mike Clarke <jmc-freebsd2@milibyte.co.uk> wrote:
> On Sunday 07 Sep 2014 04:03:25 Scot Hetzel 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
>
> I'm not sure that PROVIDE is still mandatory. But run_rc_command() in
> rc.subr does require "name" to be defined.
>
> There are several example scripts at
> <https://www.freebsd.org/doc/en/articles/rc-scripting/index.html>,
> most of which which do not include PROVIDE.
>
The scripts in 3-6, and 8 are wrong.  According to /etc/rc.subr, the
'# PROVIDE: ' is mandatory to detect a rc script:

1884find_local_scripts_new() {
1885 local_rc=''
1886 for dir in ${local_startup}; do
1887 if [ -d "${dir}" ]; then
1888 for file in `grep -l '^# PROVIDE:' ${dir}/* 2>/dev/null`; do
1889 case "$file" in
1890 *.sample) ;;
1891 *) if [ -x "$file" ]; then
1892 local_rc="${local_rc} ${file}"
1893 fi
1894 ;;
1895 esac
1896 done
1897 fi
1898 done
1899}

> Only one of the example scripts uses PROVIDE but the text implies that
> it's only needed if other scripts are to depend on it.
> <https://www.freebsd.org/doc/en/articles/rc-scripting/rcng-hookup.html>;
>


-- 
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_1umi_f8=BqUbeUSXkjRfNxbfOHY_b0aQthJnjtFp9bQ>