<%# LuCI - Lua Configuration Interface Copyright 2008 Steven Barth Copyright 2008 Jo-Philipp Wich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 $Id: applyreboot.htm 8847 2012-07-01 20:05:05Z dgolle $ -%> <%local uci = require "luci.model.uci".cursor()%> <% reboot=luci.util.trim(luci.util.exec('cat /tmp/noticeReboot')) if uci:get('functionlist','functionlist','SUPPORT_AP_RP_SETUP_WIZARD') == "1" and ( reboot == "1" or uci:get("system","firmware","first_login") == "1" )then %> <%+header%> <% uci:set("system","firmware","first_login","0") uci:save("system") uci:commit("system") wizard="1" netName="" ssid="" encryption="" key="" key_id="" if uci:get("wireless","wifi0","opmode") == "sta_ap" then netName = "wifi0_sta_ap_2" elseif uci:get("wireless","wifi1","opmode") == "sta_ap" then netName = "wifi1_sta_ap_2" end ssid = uci:get("wireless",netName,"ssid") encryption = uci:get("wireless",netName,"encryption") if encryption == "wep-open" or encryption == "wep-shared" then key_id = uci:get("wireless",netName,"key_id") str_key="key"..key_id key = uci:get("wireless",netName,str_key) key = string.gsub(key,"s:","") elseif encryption == "none" then else key = uci:get("wireless",netName,"key") end %> <% end %> <%=luci.sys.hostname()%>

<%:System%> - <% if title then %><%=title%><% else %><%:Rebooting...%><% end %>

<% if msg then %><%=msg%><% else %><%:Changes applied.%><% end %>

<%:Loading%> <%:Waiting for changes to be applied...%>