diff --git a/scripts/cleanup.sh b/scripts/cleanup.sh index d955ddc..ae7840f 100644 --- a/scripts/cleanup.sh +++ b/scripts/cleanup.sh @@ -51,6 +51,15 @@ if [ -f /etc/udev/rules.d/70-persistent-net.rules ]; then sudo rm /etc/udev/rules.d/70-persistent-net.rules fi +#add failsafe DHCP config for systemd-networkd +if [ -d /etc/systemd/network ]; then + echo "[Match] +Name=en* + +[Network] +DHCP=ipv4" | sudo tee 99-dhcp-default.network +fi + #cleanup /tmp directories sudo rm -rf /tmp/* sudo rm -rf /var/tmp/* @@ -63,4 +72,4 @@ sudo bash -c "cat /dev/null > /etc/hostname" #cleanup shell history history -w -history -c \ No newline at end of file +history -c