diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-10-07 01:54:56 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-10-07 01:54:56 +0200 |
commit | 38a9993bd1bf0024639e19a9c25328a9d5d5954e (patch) | |
tree | 1d885e9d6b88157f3a9e524df8da73d75f6c4edb /modules/luci-mod-admin-full/luasrc/controller/admin | |
parent | ada4a0ea98fbd8fa396cb601ace6c52f3857f5cc (diff) |
luci-mod-admin-full: switch to POST action for reboot
Also rework the reboot tmeplate a little bit.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-mod-admin-full/luasrc/controller/admin')
-rw-r--r-- | modules/luci-mod-admin-full/luasrc/controller/admin/system.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua index 1b38c6783c..64af555e7b 100644 --- a/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua +++ b/modules/luci-mod-admin-full/luasrc/controller/admin/system.lua @@ -34,7 +34,8 @@ function index() entry({"admin", "system", "flashops"}, call("action_flashops"), _("Backup / Flash Firmware"), 70) entry({"admin", "system", "flashops", "backupfiles"}, form("admin_system/backupfiles")) - entry({"admin", "system", "reboot"}, call("action_reboot"), _("Reboot"), 90) + entry({"admin", "system", "reboot"}, template("admin_system/reboot"), _("Reboot"), 90) + entry({"admin", "system", "reboot", "call"}, post("action_reboot")) end function action_clock_status() @@ -316,11 +317,7 @@ function action_passwd() end function action_reboot() - local reboot = luci.http.formvalue("reboot") - luci.template.render("admin_system/reboot", {reboot=reboot}) - if reboot then - luci.sys.reboot() - end + luci.sys.reboot() end function fork_exec(command) |