summaryrefslogtreecommitdiff
path: root/package/uci/trigger/apply_config
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-03-26 22:25:59 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-03-26 22:25:59 +0000
commite4c6bc70aad59701358646c38c67b39b257732a4 (patch)
treebf3264d91a9f7b8020d8783dc34a2f58cb2eae8a /package/uci/trigger/apply_config
parente8c9ebd05233163f9ae8929530faa0f77cf87bc9 (diff)
downloadmtk-20170518-e4c6bc70aad59701358646c38c67b39b257732a4.zip
mtk-20170518-e4c6bc70aad59701358646c38c67b39b257732a4.tar.gz
mtk-20170518-e4c6bc70aad59701358646c38c67b39b257732a4.tar.bz2
remove ucitrigger, it is unused and will be replaced by something different in the future
SVN-Revision: 26308
Diffstat (limited to 'package/uci/trigger/apply_config')
-rwxr-xr-xpackage/uci/trigger/apply_config54
1 files changed, 0 insertions, 54 deletions
diff --git a/package/uci/trigger/apply_config b/package/uci/trigger/apply_config
deleted file mode 100755
index 2ad6c99..0000000
--- a/package/uci/trigger/apply_config
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/usr/bin/lua
-require("uci")
-require("uci.trigger")
-
-function usage()
- print("Usage: " .. arg[0] .. " [options]")
- print("Options:")
- print(" -a: apply the config changes")
- 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
-
-if arg[1] == "-s" then
- local triggers = uci.trigger.get_active()
- if #triggers > 0 then
- print("Tasks:")
- for i, a in ipairs(triggers) do
- local trigger = a[1]
- local sections = a[2]
- print(" - " .. uci.trigger.get_description(trigger, sections))
- end
- else
- print "Nothing to do"
- end
-elseif arg[1] == "-t" then
- local triggers = uci.trigger.get_active()
- for i, a in ipairs(triggers) do
- local trigger = a[1]
- local sections = a[2]
- if trigger.section_only then
- print(trigger.id .. " " .. table.concat(sections, " "))
- else
- print(trigger.id)
- end
- end
-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