Skip to content

Instantly share code, notes, and snippets.

@chelnak
Last active August 29, 2015 14:15
Show Gist options
  • Save chelnak/0eed66e7ee4ba5d3c918 to your computer and use it in GitHub Desktop.
Save chelnak/0eed66e7ee4ba5d3c918 to your computer and use it in GitHub Desktop.
prepare.sh
#!/bin/bash
#Prepare template for vRA deployments
#disable ipv6
echo "Disable ipv6"
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo 1 > /proc/sys/net/ipv6/conf/default/disable_ipv6
#remove eth0 file
echo "Remove eth0 files"
rm -f /etc/udev/rules.d/70*
rm -f /etc/sysconfig/network-scripts/ifcfg-eth0
#reset /etc/sysconfig/network
echo "Remove default gateway"
echo "NETWORKING=yes" > /etc/sysconfig/network
#Clear temp directorys
rm –rf /tmp/*
rm –rf /var/tmp/*
#Remove SSH host keys
rm –f /etc/ssh/*key*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment