Skip to content

Instantly share code, notes, and snippets.

@halkeye
Last active December 14, 2015 22:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save halkeye/5156888 to your computer and use it in GitHub Desktop.
Save halkeye/5156888 to your computer and use it in GitHub Desktop.
#!/bin/sh
rm /etc/udev/rules.d/70-persistent-net.rules
cd /etc/sysconfig/network-scripts/
TMP=`mktemp`
TEST=`ifconfig | grep eth | awk '{ print $5}'`; sed "s/HWADDR.*/HWADDR\=$TEST/g" ifcfg-eth0 > $TMP; mv $TMP ifcfg-eth0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment