base-files: run readlink on initscript name before opening services
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37241 3c298f89-4303-0410-b956-a3cf2f4a3e73master
parent
db68332793
commit
79c725192b
|
@ -90,9 +90,9 @@ ${INIT_TRACE:+set -x}
|
||||||
|
|
||||||
[ -n "$USE_PROCD" ] && {
|
[ -n "$USE_PROCD" ] && {
|
||||||
. $IPKG_INSTROOT/lib/functions/procd.sh
|
. $IPKG_INSTROOT/lib/functions/procd.sh
|
||||||
|
basescript=$(readlink "$initscript")
|
||||||
rc_procd() {
|
rc_procd() {
|
||||||
procd_open_service "$(basename "$initscript")" "$initscript"
|
procd_open_service "$(basename ${basescript:-$initscript})" "$initscript"
|
||||||
"$@"
|
"$@"
|
||||||
procd_close_service
|
procd_close_service
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ ${INIT_TRACE:+set -x}
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
procd_kill "$(basename "$initscript")" "$1"
|
procd_kill "$(basename ${basescript:-$initscript})" "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
|
|
Loading…
Reference in New Issue