summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Nagy <robert@cvs.openbsd.org>2011-04-18 18:08:21 +0000
committerRobert Nagy <robert@cvs.openbsd.org>2011-04-18 18:08:21 +0000
commit21779d28c75de0eab9d95f9861f32517a6fbce7d (patch)
tree6df19377155365a912af8fb67f2e9ebb8a3b3246
parentef9f85e96bbe2238627d3a97a58df095e6197823 (diff)
do not print 'starting local daemons' if rc_scripts is empty
asked by/ok deraadt@, ajacoutot@
-rw-r--r--etc/rc.local16
1 files changed, 9 insertions, 7 deletions
diff --git a/etc/rc.local b/etc/rc.local
index 27bcec0d575..8f13b513a46 100644
--- a/etc/rc.local
+++ b/etc/rc.local
@@ -1,16 +1,18 @@
-# $OpenBSD: rc.local,v 1.42 2011/03/17 16:43:51 robert Exp $
+# $OpenBSD: rc.local,v 1.43 2011/04/18 18:08:20 robert Exp $
# Site-specific startup actions, daemons, and other things which
# can be done AFTER your system goes into securemode. For actions
# which should be done BEFORE your system has gone into securemode
# please see /etc/rc.securelevel.
-echo -n 'starting local daemons:'
+if [ -n "${rc_scripts}" ]; then
+ echo -n 'starting local daemons:'
-for _r in $rc_scripts; do
- [ -x /etc/rc.d/${_r} ] && /etc/rc.d/${_r} start
-done
+ for _r in $rc_scripts; do
+ [ -x /etc/rc.d/${_r} ] && /etc/rc.d/${_r} start
+ done
-# Add your local startup actions here.
+ echo '.'
+fi
-echo '.'
+# Add your local startup actions here.