summaryrefslogtreecommitdiff
path: root/init.d.BSD
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-20 17:45:00 +0000
committerRoy Marples <roy@marples.name>2007-11-20 17:45:00 +0000
commit6a6ef66d15f37b771924b4c3504f173cb9dbc3f0 (patch)
treeadbbc6d4aa8288f22d2d20e9d49e997feada3e5c /init.d.BSD
parent7048837e3fca76a804d41fbfe4f0dc9495248399 (diff)
downloadopenrc-6a6ef66d15f37b771924b4c3504f173cb9dbc3f0.tar.gz
openrc-6a6ef66d15f37b771924b4c3504f173cb9dbc3f0.tar.bz2
openrc-6a6ef66d15f37b771924b4c3504f173cb9dbc3f0.tar.xz
local.rc -> rc-enable and ensure that we start all defined services, including system ones
Diffstat (limited to 'init.d.BSD')
-rw-r--r--init.d.BSD/rc-enabled15
1 files changed, 12 insertions, 3 deletions
diff --git a/init.d.BSD/rc-enabled b/init.d.BSD/rc-enabled
index dbc71ae..239705e 100644
--- a/init.d.BSD/rc-enabled
+++ b/init.d.BSD/rc-enabled
@@ -25,19 +25,28 @@
depend() {
need localmount net
- after $(ls -1 | grep -v local)
+ after $(ls -1 | grep -v local | xargs)
}
start() {
ebegin "Starting local rc services"
- local svc= enabled= retval=0
- for svc in $(rcorder /usr/local/etc/rc.d/* 2>/dev/null); do
+ local svc= enabled= retval=0 service=
+ for svc in $(rcorder /etc/rc.d/* /usr/local/etc/rc.d/* 2>/dev/null); do
[ -x "$svc" ] || continue
+ service=$(basename ${svc})
+
+ # If we have an init script for this service, continue
+ [ -x /etc/init.d/${svc} ]] && continue
+ [ -x /usr/local/etc/init.d/${svc} ] && continue
+
+ # Ensure that the users rc.conf will start us - ignore the defaults
eval enabled=\$$(basename ${svc})_enabled
case "$enabled" in
[Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) ;;
*) continue ;;
esac
+
+ # Good to go!
"$svc" start
: $((retval += $?))
done