summary refs log tree commit diff
path: root/nixos/modules/tasks/network-interfaces-scripted.nix
diff options
context:
space:
mode:
authorYoufu Zhang <1315097+zhangyoufu@users.noreply.github.com>2018-08-02 18:10:10 +0800
committerGitHub <noreply@github.com>2018-08-02 18:10:10 +0800
commit939c6be54e65a2ad2b954f400287e70b95d44e0c (patch)
treeb0d8efa061fa941194668b622d2a09063ce8cd9d /nixos/modules/tasks/network-interfaces-scripted.nix
parentcd794f42161f1ebe31c8254be006dc5715562606 (diff)
fix vlan interface bring up on boot
when the parent interface of a vlan interface is not up (yet), ip link cannot bring the vlan interface up
the vlan interface will be automatically brought up when the parent interface is up later
fix NixOS/nixpkgs#28620
Diffstat (limited to 'nixos/modules/tasks/network-interfaces-scripted.nix')
-rw-r--r--nixos/modules/tasks/network-interfaces-scripted.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/tasks/network-interfaces-scripted.nix b/nixos/modules/tasks/network-interfaces-scripted.nix
index f3f6a19318a2f..be42516675844 100644
--- a/nixos/modules/tasks/network-interfaces-scripted.nix
+++ b/nixos/modules/tasks/network-interfaces-scripted.nix
@@ -473,7 +473,7 @@ let
               # Remove Dead Interfaces
               ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}"
               ip link add link "${v.interface}" name "${n}" type vlan id "${toString v.id}"
-              ip link set "${n}" up
+              ip link set "${n}" up || true
             '';
             postStop = ''
               ip link delete "${n}" || true