X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=libs%2Fuci%2Froot%2Fsbin%2Fluci-reload;h=24cf76064bd568d63526dc8a5bbdbe30d2a19e6f;hp=b6b1ff6ce646b425918474a062fea59fa8d8b544;hb=a5e34813e36ce3e11bad13d65dca92ef1c1eb913;hpb=c94ef7f8d3a71afc2d713f584c9ef7cb71e45861 diff --git a/libs/uci/root/sbin/luci-reload b/libs/uci/root/sbin/luci-reload index b6b1ff6ce..24cf76064 100755 --- a/libs/uci/root/sbin/luci-reload +++ b/libs/uci/root/sbin/luci-reload @@ -5,7 +5,9 @@ apply_config() { config_get init "$1" init config_get exec "$1" exec config_get test "$1" test - + + echo "$2" > "/var/run/luci-reload-status" + [ -n "$init" ] && reload_init "$2" "$init" "$test" [ -n "$exec" ] && reload_exec "$2" "$exec" "$test" } @@ -26,9 +28,13 @@ reload_init() { } } +lock "/var/run/luci-reload" + config_load ucitrack -for i in $* -do +for i in $*; do config_foreach apply_config $i $i done + +rm -f "/var/run/luci-reload-status" +lock -u "/var/run/luci-reload"