Adding nonet feature
This commit is contained in:
parent
579ad72071
commit
f4d361488c
@ -22,7 +22,7 @@ export default {
|
||||
var saved_ssid = this.saved_ssid
|
||||
var list_ssids = this.list_ssids
|
||||
var internet = this.internet
|
||||
if (window.config.iface_out.charAt(0) == "e"){
|
||||
if (window.config.iface_out.charAt(0) == 'e' || window.config.iface_out.charAt(0) == 'n'){
|
||||
router.push({ name: 'generate-ap' });
|
||||
} else {
|
||||
router.push({ name: 'wifi-select',
|
||||
|
@ -23,7 +23,7 @@
|
||||
axios.get('/api/network/status', { timeout: 10000 })
|
||||
.then(response => {
|
||||
if (response.data.internet) this.internet = true
|
||||
if (window.config.iface_out.charAt(0) == 'e') {
|
||||
if (window.config.iface_out.charAt(0) == 'e' || window.config.iface_out.charAt(0) == 'n') {
|
||||
setTimeout(function () { this.goto_home(); }.bind(this), 1000);
|
||||
} else {
|
||||
this.get_wifi_networks();
|
||||
|
@ -62,7 +62,7 @@ class Config(object):
|
||||
config[cat][key] = value
|
||||
if key == "out":
|
||||
config[cat][key] = value
|
||||
elif re.match("^(eth[0-9]|en[a-z0-9]{20})$", value) and key == "out":
|
||||
elif re.match("^(nonet|eth[0-9]|en[a-z0-9]{20})$", value) and key == "out":
|
||||
config[cat][key] = value
|
||||
else:
|
||||
return {"status": False,
|
||||
@ -137,7 +137,7 @@ class Config(object):
|
||||
:return: list of the interfaces
|
||||
"""
|
||||
try:
|
||||
return [i for i in os.listdir("/sys/class/net/") if i.startswith(("wl", "et"))]
|
||||
return [i for i in os.listdir("/sys/class/net/") if i.startswith(("wl", "et"))]+["nonet"]
|
||||
except:
|
||||
return ["No network interfaces"]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user