曲径通幽论坛

标题: 重启按钮失效的解决办法 [打印本页]

作者: beyes    时间: 2015-7-20 17:33
标题: 重启按钮失效的解决办法
一般情况下,从主导航栏下的 "System" --> "Reboot" ,单击 “Perform reboot” 时,系统会自动重启。查看 LUCI 代码,执行的是 luci.sys.reboot() 函数,但有时会失效,具体原因我暂时也没发现,不过解决办法是将 luci.sys.reboot() 替换成 luci.sys.call("reboot -f") 即可。
在 /usr/lib/lua/luci/controller/admin/system.lua 下找到 action_reboot() 函数,进行修改之:
  1. function action_reboot()
  2.         local reboot = luci.http.formvalue("reboot")
  3.         luci.template.render("admin_system/reboot", {reboot=reboot})
  4.         if reboot then
  5.                 --luci.sys.reboot()
  6.                 luci.sys.call("reboot -f")
  7.         end
  8. end
复制代码







欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) Powered by Discuz! X3.2