首页 > 其他 > 详细

LUCI system reboot 范例分析

时间:2015-05-20 20:03:21      阅读:562      评论:0      收藏:0      [点我收藏+]

系统重启:

\lua\luci\controller\admin\system.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

LUCI system reboot 范例分析

原文:http://www.cnblogs.com/souroot/p/4517824.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!