diff --git a/lib/network.js b/lib/network.js index a92a0ef..fe9bf3b 100644 --- a/lib/network.js +++ b/lib/network.js @@ -488,7 +488,7 @@ function getLinuxIfaceConnectionName(interfaceName) { function getLinuxDHCPNics() { // alternate methods getting interfaces using DHCP - let cmd = 'ip a'; + let cmd = 'ip a 2> /dev/null'; let result = []; try { const lines = execSync(cmd, { maxBuffer: 1024 * 20000 }).toString().split('\n'); @@ -498,7 +498,7 @@ function getLinuxDHCPNics() { util.noop(); } try { - cmd = 'cat /etc/network/interfaces 2> /dev/null| grep iface'; + cmd = 'cat /etc/network/interfaces 2> /dev/null | grep iface'; const lines = execSync(cmd, { maxBuffer: 1024 * 20000 }).toString().split('\n'); lines.forEach(line => { const parts = line.replace(/\s+/g, ' ').trim().split(' ');