On Sun, Sep 7, 2014 at 6:16 AM, Mike Clarke <jmc-freeb...@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.
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to