<% -- Copyright 2016 OVH (OverTheBox@ovh.net) -- Simon Lelievre (simon.lelievre@corp.ovh.com) -- Sebastien Duponcheel (sebastien.duponcheel@ovh.net) -- Cyrille Meichel (cyrille.meichel@corp.ovh.com) -- -- This file is part of OverTheBox for OpenWrt. -- -- OverTheBox is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- OverTheBox is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with OverTheBox. If not, see (http://www.gnu.org/licenses/) -%> <%+header%> <% local uci = require("luci.model.uci").cursor() local device_id = uci:get("overthebox", "me", "device_id") local service_id = uci:get("overthebox", "me", "service") local wizardStack = 0 local has_switch = true result = assert (io.popen ("ls /sys/class/net/ | grep eth | wc -l")) for line in result:lines() do eth_number = line end result:close() if tonumber(eth_number) == 1 then has_switch = false end local function wizard(title, width, height, status, id) local arrowLen = height / 3 print("") if (wizardStack == 0) then print("") print("" .. title .. "") else print("") print("" .. title .. "") end print("") wizardStack = wizardStack + width - arrowLen end %>