Created
July 2, 2011 14:40
-
-
Save hedgehog/1060540 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Removing leftover leases and persistent rules | |
echo "cleaning up dhcp leases" | |
rm /var/lib/dhcp3/* | |
# Make sure Udev doesn't block our network | |
# http://6.ptmc.org/?p=164 | |
echo "cleaning up udev rules" | |
DIR_PATH=`readlink -f "/etc/udev/rules.d/70-persistent-net.rules"` # get rid of symlinks and get abs path | |
rm -rf /etc/udev/rules.d/70-persistent-net.rules | |
if [[ ! -d "${DIR_PATH}" ]] ; then # now you're testing | |
mkdir -p /etc/udev/rules.d/70-persistent-net.rules | |
fi | |
rm -rf /dev/.udev/ | |
rm -rf /lib/udev/rules.d/75-persistent-net-generator.rules | |
echo "Adding a 2 sec delay to the interface up, to make the dhclient happy" | |
echo "pre-up sleep 2" >> /etc/network/interfaces | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment