networkInterfaces() prevent error getting DHCP Nics
This commit is contained in:
parent
cf85b2f1b6
commit
89a48ca696
@ -498,7 +498,7 @@ function getLinuxDHCPNics() {
|
|||||||
util.noop();
|
util.noop();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
cmd = 'cat /etc/network/interfaces | grep iface';
|
cmd = 'cat /etc/network/interfaces 2> /dev/null| grep iface';
|
||||||
const lines = execSync(cmd, { maxBuffer: 1024 * 20000 }).toString().split('\n');
|
const lines = execSync(cmd, { maxBuffer: 1024 * 20000 }).toString().split('\n');
|
||||||
lines.forEach(line => {
|
lines.forEach(line => {
|
||||||
const parts = line.replace(/\s+/g, ' ').trim().split(' ');
|
const parts = line.replace(/\s+/g, ' ').trim().split(' ');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user