Created
September 12, 2013 14:13
-
-
Save flickerfly/6538089 to your computer and use it in GitHub Desktop.
This is intended to clean up a CentOS or RedHat 6 box for conversion to a template in VMWare or other environments. It should be the last thing run before shutting down.
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
#!/bin/bash | |
# This is intended to clean up a CentOS or RedHat 6 box for | |
# conversion to a template in VMWare or other environments | |
# Free to use as a reference document, check before you use this | |
# as I can't take responsibility if it breaks something | |
# You may want to simply delete the config files, | |
# I prefer to just remove the MAC record | |
echo "Removing HWADDR lines from network configuration files (eth0-15)" | |
sed -i /HWADDR.*$/d /etc/sysconfig/network-scripts/ifcfg-eth[0-15] | |
echo "Removing udev rules with MAC associations" | |
rm /etc/udev/rules.d/70-persistent-net.rules | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment