曲径通幽论坛
标题:
重启按钮失效的解决办法
[打印本页]
作者:
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() 函数,进行修改之:
function action_reboot()
local reboot = luci.http.formvalue("reboot")
luci.template.render("admin_system/reboot", {reboot=reboot})
if reboot then
--luci.sys.reboot()
luci.sys.call("reboot -f")
end
end
复制代码
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/)
Powered by Discuz! X3.2