From e6603ab742dc47a195628b39c77a6649cab520f8 Mon Sep 17 00:00:00 2001 From: VP-002 U <> Date: Fri, 15 Nov 2019 12:06:14 -0500 Subject: [PATCH] Standar logs messages --- lib/network.js | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/network.js b/lib/network.js index 407a92d..7dff912 100644 --- a/lib/network.js +++ b/lib/network.js @@ -246,7 +246,7 @@ function getWindowsDNSsuffixes() { }); const primaryDNS = longPrimaryDNS[0].substring(longPrimaryDNS[0].lastIndexOf(":")+1); dnsSuffixes.primaryDNS = primaryDNS.trim(); - if(!dnsSuffixes.primaryDNS) dnsSuffixes.primaryDNS = 'not defined'; + if(!dnsSuffixes.primaryDNS) dnsSuffixes.primaryDNS = 'Not defined'; } if(index > 1) { if(index % 2 == 0){ @@ -338,7 +338,7 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) { if(state8021x.includes('Disabled')){ i8021x.state = "Disabled"; - i8021x.protocol = "Not Configured"; + i8021x.protocol = "Not defined"; return i8021x; } else { const protocol8021x = arrayIface8021xInfo.find((element) => { @@ -366,7 +366,7 @@ function getWindowsIEEE8021x(connectionType, iface, ifaces) { } catch (error) { // console.log('Entro al catch del wireless'); i8021x.state = "Disabled"; - i8021x.protocol = "Not configured"; + i8021x.protocol = "Not defined"; return i8021x; } @@ -514,7 +514,7 @@ function getLinuxIfaceDNSsuffix(connectionName) { const result = execSync(cmd).toString(); const resultFormat = result.replace(/\s+/g,' ').trim(); const dnsSuffix = resultFormat.split(" ").slice(1).toString(); - return dnsSuffix == '--' ? '': dnsSuffix; + return dnsSuffix == '--' ? 'Not defined': dnsSuffix; } catch (e) { return 'Unknown'; } @@ -534,16 +534,16 @@ function getLinuxIfaceAuth8021x(connectionName) { return authenticationProtocol == '--' ? '': authenticationProtocol; } catch (e) { - return 'Not configured'; + return 'Not defined'; } } else { - return 'Not configured'; + return 'Not defined'; } } function getLinuxIfaceState8021x(authenticationProtocol) { if(authenticationProtocol) { - if(authenticationProtocol == 'Not configured'){ + if(authenticationProtocol == 'Not defined'){ return 'Disabled'; } return 'Enabled'; @@ -678,7 +678,6 @@ function networkInterfaces(callback) { echo -n "wirelessspeed: "; iw dev ${iface} link 2>&1 \| grep bitrate; echo;`; let lines = []; - try { const connectionName = getLinuxIfaceConnectionName(iface); dhcp = getLinuxIfaceDHCPstatus(connectionName);