From: Manuel Munz Date: Wed, 1 Jun 2011 11:58:09 +0000 (+0000) Subject: luci-0.10: Merge r7111 X-Git-Tag: 0.10.0~131 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9857d8d55d7e3c69eee0c2c7ee174739071c3409;p=oweals%2Fluci.git luci-0.10: Merge r7111 --- diff --git a/libs/core/root/sbin/luci-reload b/libs/core/root/sbin/luci-reload index 24cf76064..4bcac045b 100755 --- a/libs/core/root/sbin/luci-reload +++ b/libs/core/root/sbin/luci-reload @@ -13,10 +13,15 @@ apply_config() { } reload_exec() { - [ -x $2 ] && { - echo "Reloading $1... " - $2 >/dev/null 2>&1 - [ -n "$3" -a "$?" != "$3" ] && echo '!!! Failed to reload' $1 '!!!' + local service="$1" + local ok="$3" + set -- $2 + local cmd="$1"; shift + + [ -x "$cmd" ] && { + echo "Reloading $service... " + ( $cmd "$@" ) 2>/dev/null 1>&2 + [ -n "$ok" -a "$?" != "$ok" ] && echo '!!! Failed to reload' $service '!!!' } }