Commit 306083f5 authored by Ad Schellevis's avatar Ad Schellevis

Revert "(legacy) please set interface flag one by one...."

This reverts commit 85dd1473.
parent 85dd1473
...@@ -50,12 +50,10 @@ function legacy_interface_listget($flag = '') ...@@ -50,12 +50,10 @@ function legacy_interface_listget($flag = '')
return ($ifs); return ($ifs);
} }
function legacy_interface_flags($ifs, $flags, $report_errors=true) function legacy_interface_flags($ifs, $flag, $report_errors=true)
{ {
/* $flags isn't escaped because it can be an argument list */ /* $flags isn't escaped because it can be an argument list */
foreach (explode(' ', $flags) as $flag) { $cmd = '/sbin/ifconfig ' . escapeshellarg($ifs) . ' ' . $flag;
$cmd = '/sbin/ifconfig ' . escapeshellarg($ifs) . ' ' . $flag;
}
exec($cmd . ' 2>&1', $out, $ret); exec($cmd . ' 2>&1', $out, $ret);
if (!empty($ret) && $report_errors) { if (!empty($ret) && $report_errors) {
......
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