Skip to content

Instantly share code, notes, and snippets.

@stucchio
Created December 3, 2011 17:55
Show Gist options
  • Save stucchio/1427698 to your computer and use it in GitHub Desktop.
Save stucchio/1427698 to your computer and use it in GitHub Desktop.
Making networking work on cloned Ubuntu VMs
if ! ifconfig eth0 && ! -f /var/log/rewriting-net-rules;
then
echo "Mac address for eth0 is incorrect."
/bin/rm -rf /etc/udev/rules.d/70-persistent-net.rules
touch /var/log/rewriting-net-rules
echo "Rebooting now."
/sbin/reboot
else
/bin/rm /var/log/rewriting-net-rules
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment