Merge branch 'master' of https://github.com/Tulpep/systeminformation
This commit is contained in:
commit
4ad657dc65
@ -193,12 +193,6 @@ function parseLinesWindowsNics(sections, nconfigsections) {
|
|||||||
let lines = sections[i].trim().split('\r\n');
|
let lines = sections[i].trim().split('\r\n');
|
||||||
let linesNicConfig = nconfigsections[i].trim().split('\r\n');
|
let linesNicConfig = nconfigsections[i].trim().split('\r\n');
|
||||||
let netEnabled = util.getValue(lines, 'NetEnabled', '=');
|
let netEnabled = util.getValue(lines, 'NetEnabled', '=');
|
||||||
let dnsSuffixes = util.getValue(linesNicConfig, 'DNSDomainSuffixSearchOrder', '=').replace(/{|}/g, '');
|
|
||||||
if(dnsSuffixes !== '') {
|
|
||||||
dnsSuffixes = dnsSuffixes.replace(/;/g, ',');
|
|
||||||
dnsSuffixes = dnsSuffixes.replace(/"/g, '');
|
|
||||||
dnsSuffixes = dnsSuffixes.split(",");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (netEnabled) {
|
if (netEnabled) {
|
||||||
const speed = parseInt(util.getValue(lines, 'speed', '=').trim(), 10) / 1000000;
|
const speed = parseInt(util.getValue(lines, 'speed', '=').trim(), 10) / 1000000;
|
||||||
@ -206,7 +200,6 @@ function parseLinesWindowsNics(sections, nconfigsections) {
|
|||||||
mac: util.getValue(lines, 'MACAddress', '=').toLowerCase(),
|
mac: util.getValue(lines, 'MACAddress', '=').toLowerCase(),
|
||||||
dhcp: util.getValue(linesNicConfig, 'dhcpEnabled', '=').toLowerCase(),
|
dhcp: util.getValue(linesNicConfig, 'dhcpEnabled', '=').toLowerCase(),
|
||||||
name: util.getValue(lines, 'Name', '=').replace(/\]/g, ')').replace(/\[/g, '('),
|
name: util.getValue(lines, 'Name', '=').replace(/\]/g, ')').replace(/\[/g, '('),
|
||||||
dnsSuffixes: dnsSuffixes === '' ? [] : dnsSuffixes,
|
|
||||||
netEnabled: netEnabled === 'TRUE',
|
netEnabled: netEnabled === 'TRUE',
|
||||||
speed: isNaN(speed) ? -1 : speed,
|
speed: isNaN(speed) ? -1 : speed,
|
||||||
operstate: util.getValue(lines, 'NetConnectionStatus', '=') === '2' ? 'up' : 'down',
|
operstate: util.getValue(lines, 'NetConnectionStatus', '=') === '2' ? 'up' : 'down',
|
||||||
@ -426,7 +419,6 @@ function networkInterfaces(callback) {
|
|||||||
let carrierChanges = 0;
|
let carrierChanges = 0;
|
||||||
let operstate = 'down';
|
let operstate = 'down';
|
||||||
let dhcp = false;
|
let dhcp = false;
|
||||||
let dnsSuffixes = [];
|
|
||||||
let type = '';
|
let type = '';
|
||||||
|
|
||||||
if (ifaces.hasOwnProperty(dev)) {
|
if (ifaces.hasOwnProperty(dev)) {
|
||||||
@ -508,7 +500,6 @@ function networkInterfaces(callback) {
|
|||||||
if (detail.mac === mac) {
|
if (detail.mac === mac) {
|
||||||
ifaceName = detail.name;
|
ifaceName = detail.name;
|
||||||
dhcp = detail.dhcp;
|
dhcp = detail.dhcp;
|
||||||
dnsSuffixes = detail.dnsSuffixes;
|
|
||||||
operstate = detail.operstate;
|
operstate = detail.operstate;
|
||||||
speed = detail.speed;
|
speed = detail.speed;
|
||||||
type = detail.type;
|
type = detail.type;
|
||||||
@ -534,7 +525,6 @@ function networkInterfaces(callback) {
|
|||||||
mtu,
|
mtu,
|
||||||
speed,
|
speed,
|
||||||
dhcp,
|
dhcp,
|
||||||
dnsSuffixes,
|
|
||||||
carrierChanges,
|
carrierChanges,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user