Commit 7ecfad34 authored by Dylan Baker's avatar Dylan Baker Setup network correctly

This changes the network setup to to actually check the network name
(since it's not going to be eth0 anymore) and use that name.

Also, ensure that debian's network stuff doesn't load.
parent 70db46a1
......@@ -40,10 +40,12 @@ echo 'startup_states: highstate' > /etc/salt/minion.d/startup.conf
# Add our nfs mount to fstab
echo 'otc-mesa-ci.local:/srv/jenkins /mnt/jenkins nfs _netdev,auto,async,comment=systemd.automount 0 0' >> /etc/fstab
name=$(ip addr show scope link up | grep -v DOWN | grep UP | awk '{print $2}' | sed 's@:@@')
mkdir -p /etc/systemd/network
cat > /etc/systemd/network/ << EOF
cat > "/etc/systemd/network/${name}.network" << EOF
......@@ -52,5 +54,8 @@ EOF
rm /etc/resolv.conf
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
rm /etc/network/interfaces
# Enable and disable some services
systemctl enable systemd-networkd systemd-resolved avahi-daemon salt-minion
systemctl disable networking
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