projects
/
oweals
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbdf1e0
)
libs/core: Allow the use of commands with arguments or of multiple commands for exec...
author
Manuel Munz
<freifunk@somakoma.de>
Wed, 1 Jun 2011 11:56:38 +0000
(11:56 +0000)
committer
Manuel Munz
<freifunk@somakoma.de>
Wed, 1 Jun 2011 11:56:38 +0000
(11:56 +0000)
libs/core/root/sbin/luci-reload
patch
|
blob
|
history
diff --git
a/libs/core/root/sbin/luci-reload
b/libs/core/root/sbin/luci-reload
index 24cf76064bd568d63526dc8a5bbdbe30d2a19e6f..4bcac045b30a6b8aa11af3de08d68bb1154fb657 100755
(executable)
--- 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 '!!!'
}
}