From: John Crispin Date: Thu, 11 Jul 2013 17:00:21 +0000 (+0000) Subject: base-files: run readlink on initscript name before opening services X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=06ae364c3d918dc5f347e21003b0a121b954fb56;p=openwrt%2Fstaging%2Fjow.git base-files: run readlink on initscript name before opening services Signed-off-by: John Crispin SVN-Revision: 37241 --- 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() {