summaryrefslogtreecommitdiffstats
path: root/package/uci/trigger/apply_config
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-07-06 19:04:07 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-07-06 19:04:07 +0000
commit069dbf6fd412aa01e384c8ca5fd2b51306a51412 (patch)
tree6083ef159a7c4c4e97659ad58d4967eb3b44018c /package/uci/trigger/apply_config
parent7ffee1f66f96c514642b247a8c47e8fd1eca89da (diff)
downloadmaster-31e0f0ae-069dbf6fd412aa01e384c8ca5fd2b51306a51412.tar.gz
master-31e0f0ae-069dbf6fd412aa01e384c8ca5fd2b51306a51412.tar.bz2
master-31e0f0ae-069dbf6fd412aa01e384c8ca5fd2b51306a51412.zip
ucitrigger: add options to force enable/disable specific triggers
SVN-Revision: 16718
Diffstat (limited to 'package/uci/trigger/apply_config')
-rwxr-xr-x[-rw-r--r--]package/uci/trigger/apply_config10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/uci/trigger/apply_config b/package/uci/trigger/apply_config
index 0d9c6cf15e..b2f48dacce 100644..100755
--- 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 <trigger> [<section>]: force clear a trigger")
+ print(" -S <trigger> [<section>]: force set a trigger")
print("")
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