File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -94,15 +94,9 @@ fix_eth1_static_ip() {
94
94
return 0
95
95
fi
96
96
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
106
100
107
101
# Fix eth1 if the IP isn't set correctly
108
102
ETH1_IP=$( ip -4 addr show eth1 | grep -oP ' (?<=inet\s)\d+(\.\d+){3}' | head -1)
You can’t perform that action at this time.
0 commit comments