code cleanup

This commit is contained in:
Sebastian Hildebrandt 2020-02-02 16:18:26 +01:00
parent 0164a65c20
commit b35b851a85

View File

@ -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]);
}