3 # $FreeBSD: src/etc/rc.d/localdaemons,v 1.2 2003/05/05 15:38:41 mtm Exp $
4 # $DragonFly: src/etc/rc.d/localdaemons,v 1.5 2005/12/30 21:01:49 dillon Exp $
7 # PROVIDE: localdaemons
15 start_cmd
="locald_start"
16 stop_cmd
="locald_stop"
18 # Returns true (0) if the passed argument is a valid name
19 # for a script, false (1) otherwise.
39 # For each dir in $local_startup, search for init scripts matching *
41 case ${local_startup} in
45 echo -n 'Local package initialization:'
47 if [ -z "${script_name_sep}" ]; then
50 for dir
in ${local_startup}; do
51 if [ -d "${dir}" ]; then
52 for script in ${dir}/*; do
53 if valid_scriptname
${script}; then
54 slist
="${slist}${script_name_sep}${script}"
59 script_save_sep
="$IFS"
60 IFS
="${script_name_sep}"
61 for script in ${slist}; do
62 if [ -x "${script}" ]; then
66 elif [ -f "${script}" -o -L "${script}" ]; then
67 echo -n " (skipping ${script##*/}, not executable)"
70 IFS
="${script_save_sep}"
78 echo -n 'Shutting down daemon processes:'
80 # For each dir in $local_startup, search for init scripts matching *
81 case ${local_startup} in
86 if [ -z "${script_name_sep}" ]; then
89 for dir
in ${local_startup}; do
90 if [ -d "${dir}" ]; then
91 for script in ${dir}/*; do
92 if valid_scriptname
${script}; then
93 slist
="${slist}${script_name_sep}${script}"
98 script_save_sep
="$IFS"
99 IFS
="${script_name_sep}"
100 for script in `reverse_list ${slist}`; do
101 if [ -x "${script}" ]; then
107 IFS
="${script_save_sep}"