All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit d96baf69 authored by David Johnson's avatar David Johnson

Support multiplexed VLAN parent devices correctly for systemd-networkd.

If there are multiple vlan devs multiplexed atop one parent, we have to
append to an existing <parent-dev>.network file, not replace, so that
the parent file gets all the VLAN=<vlan-iface> settings it needs.
parent 4f1b0e58
......@@ -274,7 +274,8 @@ Kind=vlan
[VLAN]
Id=$MGMTVLANTAG
EOF
cat <<EOF >/etc/systemd/network/${MGMTVLANDEV}.network
if [ ! -e /etc/systemd/network/${MGMTVLANDEV}.network ]; then
cat <<EOF >/etc/systemd/network/${MGMTVLANDEV}.network
[Match]
Name=${MGMTVLANDEV}
......@@ -282,6 +283,11 @@ Name=${MGMTVLANDEV}
DHCP=no
VLAN=${MGMT_NETWORK_INTERFACE}
EOF
else
cat <<EOF >>/etc/systemd/network/${MGMTVLANDEV}.network
VLAN=${MGMT_NETWORK_INTERFACE}
EOF
fi
fi
fi
fi
......@@ -354,7 +360,8 @@ Kind=vlan
[VLAN]
Id=$DATAVLANTAG
EOF
cat <<EOF >/etc/systemd/network/${DATAVLANDEV}.network
if [ ! -e /etc/systemd/network/${DATAVLANDEV}.network ]; then
cat <<EOF >/etc/systemd/network/${DATAVLANDEV}.network
[Match]
Name=${DATAVLANDEV}
......@@ -362,6 +369,11 @@ Name=${DATAVLANDEV}
DHCP=no
VLAN=${DATADEV}
EOF
else
cat <<EOF >/etc/systemd/network/${DATAVLANDEV}.network
VLAN=${DATADEV}
EOF
fi
fi
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment