diff options
author | John Crispin <john@openwrt.org> | 2013-07-11 17:00:21 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2013-07-11 17:00:21 +0000 |
commit | 06ae364c3d918dc5f347e21003b0a121b954fb56 (patch) | |
tree | 66526a6bf6ba1617a59fbe7baf24272393c31b9b /package/base-files/files/etc/rc.common | |
parent | 523114e741988757a625ab36e26ce83b329c4f08 (diff) | |
download | mtk-20170518-06ae364c3d918dc5f347e21003b0a121b954fb56.zip mtk-20170518-06ae364c3d918dc5f347e21003b0a121b954fb56.tar.gz mtk-20170518-06ae364c3d918dc5f347e21003b0a121b954fb56.tar.bz2 |
base-files: run readlink on initscript name before opening services
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 37241
Diffstat (limited to 'package/base-files/files/etc/rc.common')
-rwxr-xr-x | package/base-files/files/etc/rc.common | 6 |
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 78e2dd4..aeec90c 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() { |