2013-02-26 04:53:56 +00:00
|
|
|
. /tmp/post-install/variables.txt
|
|
|
|
|
|
|
|
echo "Updating hostname to $HOSTNAME"
|
|
|
|
sed -i "s/HOSTNAME=.*/HOSTNAME=$HOSTNAME/g" /etc/sysconfig/network
|
|
|
|
|
2013-04-10 06:36:22 +00:00
|
|
|
hostname $HOSTNAME
|
|
|
|
|
|
|
|
echo "Old ifcfg-$DEVICE is:"
|
|
|
|
cat /etc/sysconfig/network-scripts/ifcfg-$DEVICE
|
|
|
|
|
|
|
|
HWADDR=`ifconfig $DEVICE|grep HWaddr|awk '{print $5}'`
|
|
|
|
sed -i "s/HWADDR=.*/HWADDR="$HWADDR"/g" /etc/sysconfig/network-scripts/ifcfg-$DEVICE
|
|
|
|
sed -i "s/UUID=.*//g" /etc/sysconfig/network-scripts/ifcfg-$DEVICE
|
|
|
|
|
|
|
|
echo "New ifcfg-$DEVICE is:"
|
|
|
|
cat /etc/sysconfig/network-scripts/ifcfg-$DEVICE
|