aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-07-11 17:00:21 +0000
committerJohn Crispin <blogic@openwrt.org>2013-07-11 17:00:21 +0000
commit79c725192b4fc000bed173b9de7d0ff448a3adec (patch)
treeb06f3f2161828581b1bd97a15dc586963257dade
parentdb68332793a237b3af2d0dea9a30a00dcda8d621 (diff)
downloadmaster-187ad058-79c725192b4fc000bed173b9de7d0ff448a3adec.tar.gz
master-187ad058-79c725192b4fc000bed173b9de7d0ff448a3adec.tar.bz2
master-187ad058-79c725192b4fc000bed173b9de7d0ff448a3adec.zip
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-a3cf2f4a3e73
-rwxr-xr-xpackage/base-files/files/etc/rc.common6
1 files changed, 3 insertions, 3 deletions
diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common
index 78e2dd4940..aeec90c37c 100755
--- a/package/base-files/files/etc/rc.common
+++ b/package/base-files/files/etc/rc.common
@@ -90,9 +90,9 @@ ${INIT_TRACE:+set -x}
[ -n "$USE_PROCD" ] && {
. $IPKG_INSTROOT/lib/functions/procd.sh
-
+ basescript=$(readlink "$initscript")
rc_procd() {
- procd_open_service "$(basename "$initscript")" "$initscript"
+ procd_open_service "$(basename ${basescript:-$initscript})" "$initscript"
"$@"
procd_close_service
}
@@ -102,7 +102,7 @@ ${INIT_TRACE:+set -x}
}
stop() {
- procd_kill "$(basename "$initscript")" "$1"
+ procd_kill "$(basename ${basescript:-$initscript})" "$1"
}
reload() {