diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-09-21 19:06:30 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-09-21 19:06:30 +0200 |
commit | 2dd6c009be12c28971420354c57e52d4ab3855ec (patch) | |
tree | 4459b63d6c59574f6afa316a292fa34534308015 | |
parent | 4518f8f3428471aa44fe7d2bd6e2cfa5be23af8f (diff) |
luci-mod-system: remove unused controller actions
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r-- | modules/luci-mod-system/luasrc/controller/admin/system.lua | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/modules/luci-mod-system/luasrc/controller/admin/system.lua b/modules/luci-mod-system/luasrc/controller/admin/system.lua index eaf1105dd6..d6e1dc7815 100644 --- a/modules/luci-mod-system/luasrc/controller/admin/system.lua +++ b/modules/luci-mod-system/luasrc/controller/admin/system.lua @@ -8,8 +8,6 @@ function index() local fs = require "nixio.fs" entry({"admin", "system", "system"}, view("system/system"), _("System"), 1) - entry({"admin", "system", "clock_status"}, post_on({ set = true }, "action_clock_status")) - entry({"admin", "system", "ntp_restart"}, call("action_ntp_restart"), nil).leaf = true entry({"admin", "system", "admin"}, firstchild(), _("Administration"), 2) entry({"admin", "system", "admin", "password"}, view("system/password"), _("Router Password"), 1) @@ -45,30 +43,6 @@ function index() entry({"admin", "system", "reboot", "call"}, post("action_reboot")) end -function action_clock_status() - local set = tonumber(luci.http.formvalue("set")) - if set ~= nil and set > 0 then - local date = os.date("*t", set) - if date then - luci.sys.call("date -s '%04d-%02d-%02d %02d:%02d:%02d'" %{ - date.year, date.month, date.day, date.hour, date.min, date.sec - }) - luci.sys.call("/etc/init.d/sysfixtime restart") - end - end - - luci.http.prepare_content("application/json") - luci.http.write_json({ timestring = os.date("%c") }) -end - -function action_ntp_restart() - if nixio.fs.access("/etc/init.d/sysntpd") then - os.execute("/etc/init.d/sysntpd restart") - end - luci.http.prepare_content("text/plain") - luci.http.write("0") -end - local function image_supported(image) return (os.execute("sysupgrade -T %q >/dev/null" % image) == 0) end |