Update Vagrant setup to Debian Buster and libvirt
This commit is contained in:
parent
ca0d8451d0
commit
3abf3c6eca
6 changed files with 45 additions and 44 deletions
15
change-vmdebootstrap-default-dhcp.sh
Normal file
15
change-vmdebootstrap-default-dhcp.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
debootstrap_network=/etc/systemd/network/99-dhcp.network
|
||||
|
||||
if grep -q '^Name=\\*' "${debootstrap_network}"; then
|
||||
primary_nic=$(ls -1 /sys/class/net | grep -v lo |sort | head -1)
|
||||
sed -i "s/^Name=e\\*/Name=${primary_nic}/" \
|
||||
"${debootstrap_network}"
|
||||
systemctl restart systemd-networkd.service
|
||||
echo "Changed systemd network configuration"
|
||||
else
|
||||
echo "Systemd network configuration has already been changed"
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue