chelnak
2/18/2015 - 10:21 AM

prepare.sh

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*