gvavagrant/scripts/change-vmdebootstrap-default-dhcp.sh
Jan Dittberner f48eb2caf0 Allow boostrap with Buster
- add script and Vagrantfile code to preseed salt minion keys
- add needed bootstrap_options for Python 3 support
- add grains files and populate those of the ldap and web node
- add script to fix systemd-networkd setup with Debian libvirt Vagrant
  images
- switch from VirtualBox to libvirt
2020-03-04 13:56:20 +01:00

15 lines
438 B
Bash

#!/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