Commit c64b6dbd authored by Ad Schellevis's avatar Ad Schellevis

(legacy) optionally disable error output in legacy_interface_flags

parent e95f539e
......@@ -50,13 +50,13 @@ function legacy_interface_listget($flag = '')
return ($ifs);
}
function legacy_interface_flags($ifs, $flag)
function legacy_interface_flags($ifs, $flag, $report_errors=true)
{
/* $flags isn't escaped because it can be an argument list */
$cmd = '/sbin/ifconfig ' . escapeshellarg($ifs) . ' ' . $flag;
exec($cmd . ' 2>&1', $out, $ret);
if ($ret) {
if (!empty($ret) && $report_errors) {
log_error('The command `' . $cmd . '\' failed to execute');
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment