template: remove name
[packer_vagrant.git] / scripts / cleanup.sh
1 #!/bin/bash
2
3 # Removing leftover leases and persistent rules
4 echo "cleaning up dhcp leases"
5 rm /var/lib/dhcp/*
6
7 # Make sure Udev doesn't block our network
8 echo "cleaning up udev rules"
9 rm /etc/udev/rules.d/70-persistent-net.rules
10 mkdir /etc/udev/rules.d/70-persistent-net.rules
11 rm -rf /dev/.udev/
12 rm /lib/udev/rules.d/75-persistent-net-generator.rules
13
14 echo "Adding a 2 sec delay to the interface up, to make the dhclient happy"
15 echo "pre-up sleep 2" >> /etc/network/interfaces