summaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2008-06-22 15:34:40 +0000
committermtm <mtm@FreeBSD.org>2008-06-22 15:34:40 +0000
commit0cb079251abec91939985b82a7857384c40d85af (patch)
tree9f00c51c33b51184ba92eb9c8d08d5ea484ed06d /etc/rc.d
parent7fd85e5a638cc3e2d16089cf3cedca92b49da839 (diff)
downloadFreeBSD-src-0cb079251abec91939985b82a7857384c40d85af.zip
FreeBSD-src-0cb079251abec91939985b82a7857384c40d85af.tar.gz
Don't say we're going to [start|stop] local packages unless there actually
are local (pre rc.d) scripts to run.
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/localpkg20
1 files changed, 16 insertions, 4 deletions
diff --git a/etc/rc.d/localpkg b/etc/rc.d/localpkg
index 5de96ee..7efe504 100644
--- a/etc/rc.d/localpkg
+++ b/etc/rc.d/localpkg
@@ -16,15 +16,21 @@ stop_cmd="pkg_stop"
pkg_start()
{
+ local initdone
+
# For each dir in $local_startup, search for init scripts matching *.sh
#
case ${local_startup} in
[Nn][Oo] | '')
;;
*)
- echo -n 'Local package initialization:'
+ initdone=
find_local_scripts_old
for script in ${zlist} ${slist}; do
+ if [ -z "${initdone}" -a -f "${script}" ]; then
+ echo -n 'Local package initialization:'
+ initdone=yes
+ fi
if [ -x "${script}" ]; then
(set -T
trap 'exit 1' 2
@@ -33,20 +39,26 @@ pkg_start()
echo -n " (skipping ${script}, not executable)"
fi
done
- echo '.'
+ [ -n "${initdone}" ] && echo '.'
;;
esac
}
pkg_stop()
{
+ local initdone
+
case ${local_startup} in
[Nn][Oo] | '')
;;
*)
- echo -n 'Shutting down daemon processes:'
+ initdone=
find_local_scripts_old
for script in `reverse_list ${slist} ${zlist}`; do
+ if [ -z "${initdone}" -a -f "${script}" ]; then
+ echo -n 'Shutting down daemon processes:'
+ initdone=yes
+ fi
if [ -x "${script}" ]; then
if [ `sysctl -n debug.bootverbose` -eq 1 ]; then
echo "==>" ${script}
@@ -56,7 +68,7 @@ pkg_stop()
${script} stop)
fi
done
- echo '.'
+ [ -n "${initdone}" ] && echo '.'
;;
esac
}
OpenPOWER on IntegriCloud