git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #44347 from zhangyoufu/patch-28620

fix vlan interface bring up on boot

commit2d5f599b35399cad5d2f625eba06705ffc97f05c authorGraham Christensen <graham@grahamc.com> dateSat 1 Sep 2018, 21:28 (8 years ago) parentb5035a8762cea6
1 file changed+6−1
nixos/modules/tasks/network-interfaces-scripted.nix+6−1
nixos/modules/tasks/network-interfaces-scripted.nix+6−1
@@ -473,7 +473,12 @@ let
473473 # Remove Dead Interfaces
474474 ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}"
475475 ip link add link "${v.interface}" name "${n}" type vlan id "${toString v.id}"
476− ip link set "${n}" up
476+
477+ # We try to bring up the logical VLAN interface. If the master
478+ # interface the logical interface is dependent upon is not up yet we will
479+ # fail to immediately bring up the logical interface. The resulting logical
480+ # interface will brought up later when the master interface is up.
481+ ip link set "${n}" up || true
477482 '';
478483 postStop = ''
479484 ip link delete "${n}" || true