modules/wireguard: ignore errors when add ip route
This commit is contained in:
parent
e813ce3c9a
commit
17b9c93563
1 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@ in
|
|||
addr=`${pkgs.iproute}/bin/ip route | ${pkgs.gawk}/bin/awk '/default/ {print $3; exit}'`
|
||||
interface=`${pkgs.iproute}/bin/ip route | ${pkgs.gawk}/bin/awk '/default/ {print $5; exit}'`
|
||||
'' + lib.concatLines (map
|
||||
(addr: "${pkgs.iproute}/bin/ip route add ${addr} via $addr dev $interface")
|
||||
(addr: "${pkgs.iproute}/bin/ip route add ${addr} via $addr dev $interface || true")
|
||||
addrsViaDefaultInterface
|
||||
);
|
||||
|
||||
|
@ -62,7 +62,7 @@ in
|
|||
addr=`${pkgs.iproute}/bin/ip route | ${pkgs.gawk}/bin/awk '/default/ {print $3; exit}'`
|
||||
interface=`${pkgs.iproute}/bin/ip route | ${pkgs.gawk}/bin/awk '/default/ {print $5; exit}'`
|
||||
'' + lib.concatLines (map
|
||||
(addr: "${pkgs.iproute}/bin/ip route del ${addr} via $addr dev $interface")
|
||||
(addr: "${pkgs.iproute}/bin/ip route del ${addr} via $addr dev $interface || true")
|
||||
addrsViaDefaultInterface
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue