<%# Opennet Firmware Copyright 2010 Rene Ejury 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 -%> <% local uci = require "luci.model.uci" local cursor = uci.cursor() local reboot = luci.http.formvalue("reboot") local reconfigure = luci.http.formvalue("reconfigure") %> <%+header%>

<%:System Reboot%>

<%:Reboots the operating system of your device%>

<% if not reboot and not reconfigure then %>

<% lan_ipaddr = cursor:get("on-core_preset", "defaults", "lan_ipaddr") lan_netmask = cursor:get("on-core_preset", "defaults", "lan_netmask") on_ipschema = cursor:get("on-core_preset", "defaults", "on_ipschema") on_netmask = cursor:get("on-core_preset", "defaults", "on_netmask") on_id = cursor:get("on-core_preset", "defaults", "on_id_preset") on_ipaddr = luci.sys.exec(". /usr/bin/on-helper.sh; get_on_ip '"..on_id.."' '"..on_ipschema.."' '0'") print(luci.i18n.stringf([[Remove current configuration and redetect and reconfigure device interfaces again. After reboot, local LAN-device will be at %s/%s. A probably disabled DHCP-Server on LAN will not be reenabled - you should do this by hand. Opennet devices (WLAN) will be configured to start with %s/%s and follow the rules for multiple interfaces. If this is not enough for you, you can try a complete reset at the system backup page, but be aware that you will loose all keys and certs than too.]], lan_ipaddr, lan_netmask, on_ipaddr, on_netmask, controller)) %>
<%- else if reconfigure then luci.sys.exec("rm /etc/config/network") luci.sys.exec("rm /etc/config/wireless") end luci.sys.reboot() -%>

<%:Please wait: Device rebooting...%>

<%- end -%> <%+footer%>