Skip to content

Commit b19ca5a

Browse files
committed
Fix logger getting dhcp on eth1
1 parent 70fb1ec commit b19ca5a

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

Vagrant/logger_bootstrap.sh

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,9 @@ fix_eth1_static_ip() {
9494
return 0
9595
fi
9696
fi
97-
# There's a fun issue where dhclient keeps messing with eth1 despite the fact
98-
# that eth1 has a static IP set. We workaround this by setting a static DHCP lease.
99-
if ! grep 'interface "eth1"' /etc/dhcp/dhclient.conf; then
100-
echo -e 'interface "eth1" {
101-
send host-name = gethostname();
102-
send dhcp-requested-address 192.168.56.105;
103-
}' >>/etc/dhcp/dhclient.conf
104-
netplan apply
105-
fi
97+
# TODO: try to set correctly directly through vagrant net config
98+
netplan set ethernets.eth1.dhcp4=false
99+
netplan apply
106100

107101
# Fix eth1 if the IP isn't set correctly
108102
ETH1_IP=$(ip -4 addr show eth1 | grep -oP '(?<=inet\s)\d+(\.\d+){3}' | head -1)

0 commit comments

Comments
 (0)