X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=package%2Fuci%2Ftrigger%2Fapply_config;h=2ad6c9992a2c9c1a6ef73f69253c98ea9b503922;hb=232ec2e0d27cf2d28abffa7b4e71198a6b40f75e;hp=0d9c6cf15ebba0ab53a75c2e44d202655ee3c4c1;hpb=9aad34a95c6cc7d68e12cd7d3fc2436f3106e9c6;p=openwrt.git diff --git a/package/uci/trigger/apply_config b/package/uci/trigger/apply_config old mode 100644 new mode 100755 index 0d9c6cf15e..2ad6c9992a --- a/package/uci/trigger/apply_config +++ b/package/uci/trigger/apply_config @@ -9,6 +9,8 @@ function usage() print(" -t: show matching UCI triggers") print(" -s: show information about tasks to be executed") print(" -r: reset all triggers") + print(" -C [
]: force clear a trigger") + print(" -S [
]: force set a trigger") print("") end @@ -30,7 +32,7 @@ elseif arg[1] == "-t" then local trigger = a[1] local sections = a[2] if trigger.section_only then - print(trigger.id .. " " .. table.concat(" ", sections)) + print(trigger.id .. " " .. table.concat(sections, " ")) else print(trigger.id) end @@ -39,6 +41,14 @@ elseif arg[1] == "-a" then uci.trigger.run() elseif arg[1] == "-r" then uci.trigger.reset_state() +elseif arg[1] == "-S" then + local trigger = arg[2] + local section = arg[3] + uci.trigger.set_active(trigger, section) +elseif arg[1] == "-C" then + local trigger = arg[2] + local section = arg[3] + uci.trigger.clear_active(trigger, section) else usage() end