Skip to content

Instantly share code, notes, and snippets.

@asw456
Forked from stucchio/rc.local
Created May 7, 2014 13:20
Show Gist options
  • Save asw456/d0bc1ef1a0fed4f67c31 to your computer and use it in GitHub Desktop.
Save asw456/d0bc1ef1a0fed4f67c31 to your computer and use it in GitHub Desktop.
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