Merge pull request #44347 from zhangyoufu/patch-28620
fix vlan interface bring up on boot
This commit is contained in:
commit
2d5f599b35
@ -473,7 +473,12 @@ let
|
|||||||
# Remove Dead Interfaces
|
# Remove Dead Interfaces
|
||||||
ip link show "${n}" >/dev/null 2>&1 && ip link delete "${n}"
|
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 add link "${v.interface}" name "${n}" type vlan id "${toString v.id}"
|
||||||
ip link set "${n}" up
|
|
||||||
|
# We try to bring up the logical VLAN interface. If the master
|
||||||
|
# interface the logical interface is dependent upon is not up yet we will
|
||||||
|
# fail to immediately bring up the logical interface. The resulting logical
|
||||||
|
# interface will brought up later when the master interface is up.
|
||||||
|
ip link set "${n}" up || true
|
||||||
'';
|
'';
|
||||||
postStop = ''
|
postStop = ''
|
||||||
ip link delete "${n}" || true
|
ip link delete "${n}" || true
|
||||||
|
Loading…
Reference in New Issue
Block a user