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 0b7b1d42 authored by David Johnson's avatar David Johnson

Handle linuxbridge multiplexed vlan static config properly.

parent eb941852
......@@ -316,30 +316,6 @@ EOF
mkdir -p /var/run/emulab
echo "${DATABRIDGE} $DATAIP $DATAMAC" > /var/run/emulab/interface-done-$DATAMAC
EOF
if [ -n "$DATAVLANDEV" ]; then
cat <<EOF >/etc/systemd/network/${DATADEV}.netdev
[Match]
Name=${DATADEV}
Kind=vlan
[VLAN]
Id=${DATAVLANTAG}
EOF
if [ ! -e /etc/systemd/network/${DATAVLANDEV}.network ]; then
cat <<EOF >/etc/systemd/network/${DATAVLANDEV}.network
[Match]
Name=${MGMTVLANDEV}
[Network]
DHCP=no
VLAN=${DATADEV}
EOF
else
cat <<EOF >>/etc/systemd/network/${DATAVLANDEV}.network
VLAN=${DATADEV}
EOF
fi
fi
fi
else
if [ $DISTRIB_MAJOR -lt 18 ]; then
......@@ -365,6 +341,32 @@ EOF
mkdir -p /var/run/emulab
echo "${DATABRIDGE} $DATAIP $DATAMAC" > /var/run/emulab/interface-done-$DATAMAC
EOF
fi
fi
# Handle vlan dev for $DATAVLANDEV case
if [ $DISTRIB_MAJOR -ge 18 -a -n "$DATAVLANDEV" ]; then
cat <<EOF >/etc/systemd/network/${DATADEV}.netdev
[Match]
Name=${DATADEV}
Kind=vlan
[VLAN]
Id=${DATAVLANTAG}
EOF
if [ ! -e /etc/systemd/network/${DATAVLANDEV}.network ]; then
cat <<EOF >/etc/systemd/network/${DATAVLANDEV}.network
[Match]
Name=${MGMTVLANDEV}
[Network]
DHCP=no
VLAN=${DATADEV}
EOF
else
cat <<EOF >>/etc/systemd/network/${DATAVLANDEV}.network
VLAN=${DATADEV}
EOF
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