Ensure that rc.d services are not started twice if PKG_DIR is blank.
Fixes #170
This commit is contained in:
parent
fb051bf81a
commit
b32c9c1139
@ -13,8 +13,9 @@ depend()
|
|||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
ebegin "Starting local rc services"
|
ebegin "Starting local rc services"
|
||||||
local svc= enabled= retval=0 service=
|
local svc= enabled= retval=0 service= pkgdir=
|
||||||
for svc in $(rcorder /etc/rc.d/* @PKG_PREFIX@/etc/rc.d/* 2>/dev/null); do
|
[ -n "@PKG_PREFIX@" ] && pkgdir="@PKG_PREFIX@/etc/rc.d/*"
|
||||||
|
for svc in $(rcorder /etc/rc.d/* $pkgdir 2>/dev/null); do
|
||||||
[ -x "$svc" ] || continue
|
[ -x "$svc" ] || continue
|
||||||
service=${svc##*/}
|
service=${svc##*/}
|
||||||
|
|
||||||
@ -26,7 +27,7 @@ start()
|
|||||||
# If we have an init script for this service, continue
|
# If we have an init script for this service, continue
|
||||||
rc-service --exists "$service" && continue
|
rc-service --exists "$service" && continue
|
||||||
|
|
||||||
# Ensure that the users rc.conf will start us - ignore the defaults
|
# Ensure that the users rc.conf will start us
|
||||||
eval enabled=\$${svc##*/}_enable
|
eval enabled=\$${svc##*/}_enable
|
||||||
yesno $enabled || yesno ${svc##*/} || continue
|
yesno $enabled || yesno ${svc##*/} || continue
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user