$Id$
]]--
-require("luci.tools.webadmin")
+
+local wa = require "luci.tools.webadmin"
+local fs = require "nixio.fs"
+
arg[1] = arg[1] or ""
m = Map("wireless", translate("networks"), translate("a_w_networks1"))
network.rmempty = true
network:value("")
network.combobox_manual = translate("a_w_netmanual")
-luci.tools.webadmin.cbi_add_networks(network)
+wa.cbi_add_networks(network)
function network.write(self, section, value)
if not m.uci:get("network", value) then
-------------------- MAC80211 Interface ----------------------
if hwtype == "mac80211" then
- if luci.fs.mtime("/usr/sbin/iw") then
+ if fs.access("/usr/sbin/iw") then
mode:value("mesh", "802.11s")
end
encr:value("wep", "WEP")
if hwtype == "atheros" or hwtype == "mac80211" or hwtype == "prism2" then
- local supplicant = luci.fs.mtime("/usr/sbin/wpa_supplicant")
- local hostapd = luci.fs.mtime("/usr/sbin/hostapd")
+ local supplicant = fs.access("/usr/sbin/wpa_supplicant")
+ local hostapd = fs.access("/usr/sbin/hostapd")
if hostapd and supplicant then
encr:value("psk", "WPA-PSK")