系统重启:
lualucicontrolleradminsystem.lua
entry({"admin", "system", "reboot"}, call("action_reboot"), _("Reboot"), 90)
直接调用action_reboot接口:
function action_reboot() local reboot = luci.http.formvalue("reboot") luci.template.render("admin_system/reboot", {reboot=reboot}) if reboot then luci.sys.reboot() end end
关键就在于luci.sys.reboot()啦
此接口参照
http://luci.subsignal.org/api/luci/modules/luci.sys.html#reboot