mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-18 18:44:44 +00:00
fixup_default_gateway suppress stderr
This commit is contained in:
parent
6009ab939d
commit
834ccbe0f7
@ -755,7 +755,7 @@ function fixup_default_gateway($gateways_status, $gateways_arr)
|
||||
} else {
|
||||
$gwip = $gateways_arr[$dfltgwname]['gateway'];
|
||||
}
|
||||
$tmpcmd = "/sbin/route -n get -{$ipprotocol} default | /usr/bin/awk '/gateway:/ {print $2}'";
|
||||
$tmpcmd = "sh -c '/sbin/route -n get -{$ipprotocol} default 2>/dev/null' | /usr/bin/awk '/gateway:/ {print $2}'";
|
||||
$defaultgw = trim(exec($tmpcmd), " \n");
|
||||
if (!$dfltgwup) {
|
||||
log_error("Default gateway down setting {$dfltgwname} as default!");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user