system: ignore monitor status on boot

This commit is contained in:
Franco Fichtner 2024-11-18 16:42:52 +01:00
parent e40596e16e
commit db8005b186
2 changed files with 3 additions and 3 deletions

View File

@ -664,7 +664,7 @@ function system_routing_configure($verbose = false, $interface_map = null, $moni
$ifdetails = legacy_interfaces_details();
$gateways = new \OPNsense\Routing\Gateways();
$down_gateways = isset($config['system']['gw_switch_default']) ? return_down_gateways() : [];
$down_gateways = isset($config['system']['gw_switch_default']) && $monitor !== 'ignore' ? return_down_gateways() : [];
$routes = json_decode(configd_run('interface routes list -n json'), true) ?? [];
foreach ($gateways->gatewaysIndexedByName() as $gateway) {
@ -774,7 +774,7 @@ function system_routing_configure($verbose = false, $interface_map = null, $moni
service_log("done.\n", $verbose);
if ($monitor) {
if ($monitor === true) {
/* reload requested monitors only or reload in full */
$gwnames = !empty($interface_map) ? [] : null;

View File

@ -91,7 +91,7 @@ interfaces_configure(true);
system_resolver_configure(true); /* adapts to runtime interface configuration */
filter_configure_sync(true);
plugins_configure('early', true);
system_routing_configure(true, null, false);
system_routing_configure(true, null, 'ignore');
plugins_configure('dhcp', true);
plugins_configure('dns', true);