code cleanup
This commit is contained in:
parent
0164a65c20
commit
b35b851a85
@ -505,7 +505,7 @@ function getLinuxDHCPNics() {
|
||||
const lines = execSync(cmd, { maxBuffer: 1024 * 20000 }).toString().split('\n');
|
||||
lines.forEach(line => {
|
||||
const parts = line.replace(/\s+/g, ' ').trim().split(' ');
|
||||
if (parts.length >=4) {
|
||||
if (parts.length >= 4) {
|
||||
if (line.toLowerCase().indexOf(' inet ') >= 0 && line.toLowerCase().indexOf('dhcp') >= 0) {
|
||||
result.push(parts[1]);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user