From 069dbf6fd412aa01e384c8ca5fd2b51306a51412 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 6 Jul 2009 19:04:07 +0000 Subject: ucitrigger: add options to force enable/disable specific triggers SVN-Revision: 16718 --- package/uci/trigger/apply_config | 10 ++++++++++ 1 file changed, 10 insertions(+) mode change 100644 => 100755 package/uci/trigger/apply_config (limited to 'package/uci/trigger/apply_config') diff --git a/package/uci/trigger/apply_config b/package/uci/trigger/apply_config old mode 100644 new mode 100755 index 0d9c6cf15e..b2f48dacce --- 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 @@ -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 -- cgit v1.2.3