diff --git a/src/etc/one-context.d/loc-10-network.d/functions b/src/etc/one-context.d/loc-10-network.d/functions index 6b103f1..9b705dd 100644 --- a/src/etc/one-context.d/loc-10-network.d/functions +++ b/src/etc/one-context.d/loc-10-network.d/functions @@ -54,6 +54,8 @@ initialize_network() # shellcheck disable=SC2154 [ "${action}" = 'configure' ] || return 0 + export onegate_proxy_route_missing="yes" # flag route not setup + _context_interfaces=$(get_context_interfaces) _iface_mac=$(get_interface_mac) diff --git a/src/etc/one-context.d/loc-10-network.d/netcfg-interfaces b/src/etc/one-context.d/loc-10-network.d/netcfg-interfaces index 65ac480..27e1e6f 100644 --- a/src/etc/one-context.d/loc-10-network.d/netcfg-interfaces +++ b/src/etc/one-context.d/loc-10-network.d/netcfg-interfaces @@ -176,7 +176,7 @@ EOT # Add ONEGATE Proxy static route if [[ $(add_onegate_proxy_route?) ]]; then - echo " up ip route replace ${onegate_host} via ${dev}" + echo " up ip route replace ${onegate_host} dev ${dev}" # Will make proxy static route only applicable to 1st interface unset onegate_proxy_route_missing @@ -375,8 +375,6 @@ EOT _context_interfaces=$(get_context_interfaces) - export onegate_proxy_route_missing="yes" # flag route not setup - for _iface in $_context_interfaces; do setup_iface_vars "$_iface" diff --git a/src/etc/one-context.d/loc-10-network.d/netcfg-scripts b/src/etc/one-context.d/loc-10-network.d/netcfg-scripts index 993eeb7..4460082 100644 --- a/src/etc/one-context.d/loc-10-network.d/netcfg-scripts +++ b/src/etc/one-context.d/loc-10-network.d/netcfg-scripts @@ -142,7 +142,7 @@ EOT # Add ONEGATE Proxy static route if [[ $(add_onegate_proxy_route?) ]]; then - route="${onegate_host} via ${dev}" + route="${onegate_host} dev ${dev}" echo "$route" >> "${config_path}/route-${dev}" # Will make proxy static route only applicable to 1st interface