Skip to content

Commit

Permalink
Merge pull request #321 from zimmer7/fix_ens33_issue
Browse files Browse the repository at this point in the history
Fix mac address issue for ens33 on centos 7
  • Loading branch information
juliandunn committed Feb 26, 2015
2 parents badd2f2 + c3601ac commit 90321e5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packer/scripts/centos/cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ rm -f /tmp/chef*rpm

# clean up redhat interface persistence
rm -f /etc/udev/rules.d/70-persistent-net.rules
if [ -r /etc/sysconfig/network-scripts/ifcfg-eth0 ]; then
sed -i 's/^HWADDR.*$//' /etc/sysconfig/network-scripts/ifcfg-eth0
sed -i 's/^UUID.*$//' /etc/sysconfig/network-scripts/ifcfg-eth0
fi

for ndev in $(ls /etc/sysconfig/network-scripts/ifcfg-*); do
if [ "$(basename ${ndev})" != "ifcfg-lo" ]; then
sed -i '/^HWADDR/d' ${ndev}
sed -i '/^UUID/d' ${ndev}
fi
done

0 comments on commit 90321e5

Please sign in to comment.