summaryrefslogtreecommitdiffstats
path: root/etc/rc
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-09-18 07:38:18 +0000
committerjkh <jkh@FreeBSD.org>1995-09-18 07:38:18 +0000
commit29f0a0da6db16cbeba8129f41ac63d642c7fbe14 (patch)
treea7055cb28fc2f04518698d911832235b6cd3d6ea /etc/rc
parentbb32dc315ae0b7b3899adc8dac24a1b60e5ad30c (diff)
downloadFreeBSD-src-29f0a0da6db16cbeba8129f41ac63d642c7fbe14.zip
FreeBSD-src-29f0a0da6db16cbeba8129f41ac63d642c7fbe14.tar.gz
Add support for /etc/rc.local.d directory, ala SYSV. If the purists
don't like it, they don't have to use it. The check makes sure that /etc/rc.local.d exists before attempting to do anything with it. Now packages will be able to add their startups as /etc/rc.local.d/<pkgname>.sh in order to get local startup behavior. Maybe we can stop adding knobs to /etc/sysconfig for ports/packages now? Submitted by: wollman & jkh
Diffstat (limited to 'etc/rc')
-rw-r--r--etc/rc12
1 files changed, 8 insertions, 4 deletions
diff --git a/etc/rc b/etc/rc
index a8cc6de..7d447bb 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Id: rc,v 1.68 1995/07/20 16:26:25 wollman Exp $
+# $Id: rc,v 1.69 1995/09/14 02:44:47 jkh Exp $
# From: @(#)rc 5.27 (Berkeley) 6/5/91
# System startup script run by init on autoboot
@@ -302,10 +302,14 @@ if [ -f /etc/rc.$arch ]; then
. /etc/rc.$arch
fi
-# Do traditional (but rather obsolete) rc.local file if it exists.
-if [ -f /etc/rc.local ]; then
- sh /etc/rc.local
+if [ -d /etc/rc.local.d ]; then
+ for script in /etc/rc.local.d/*.sh; do
+ [ -x $script ] && $script start
+ done
fi
+# Do traditional (but rather obsolete) rc.local file if it exists.
+[ -x /etc/rc.local ] && /etc/rc.local
+
date
exit 0
OpenPOWER on IntegriCloud