From 985de85cad08bd32d11431b6428195992fef89e9 Mon Sep 17 00:00:00 2001 From: sjing Date: Tue, 14 May 2013 02:47:44 +0000 Subject: [PATCH] back port sysclone support git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16286 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/configefi | 4 ++-- xCAT/postscripts/updatenetwork | 23 +++++++++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/xCAT/postscripts/configefi b/xCAT/postscripts/configefi index 62ae70345..6067248ce 100644 --- a/xCAT/postscripts/configefi +++ b/xCAT/postscripts/configefi @@ -1,2 +1,2 @@ -echo "Setting Boot Manager for the next boot." -efibootmgr -c -l \\EFI\\redhat\\grub.efi -L Linux \ No newline at end of file +echo "Setting Boot Manager for the next boot." +efibootmgr -c -l \\EFI\\redhat\\grub.efi -L Linux diff --git a/xCAT/postscripts/updatenetwork b/xCAT/postscripts/updatenetwork index 9a2cefd4b..d40cfdbd2 100644 --- a/xCAT/postscripts/updatenetwork +++ b/xCAT/postscripts/updatenetwork @@ -1,6 +1,17 @@ -. /tmp/post-install/variables.txt - -echo "Updating hostname to $HOSTNAME" -sed -i "s/HOSTNAME=.*/HOSTNAME=$HOSTNAME/g" /etc/sysconfig/network - -hostname $HOSTNAME \ No newline at end of file +#!/bin/bash +. /tmp/post-install/variables.txt + +echo "Updating hostname to $HOSTNAME" +sed -i "s/HOSTNAME=.*/HOSTNAME=$HOSTNAME/g" /etc/sysconfig/network + +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