2009-05-12 20:14:28 +00:00
|
|
|
#
|
|
|
|
# Setup hostname
|
|
|
|
#
|
|
|
|
echo "post scripts" >/root/post.log
|
2010-05-04 18:22:41 +00:00
|
|
|
export PRINIC=#TABLEBLANKOKAY:noderes:THISNODE:primarynic#
|
2009-05-12 20:14:28 +00:00
|
|
|
if [ -z "$PRINIC" ]
|
|
|
|
then
|
2010-06-04 13:32:43 +00:00
|
|
|
for karg in $(cat /proc/cmdline |sed -e 's/-/:/g' -e 's/ /\n/g'); do
|
2010-05-04 18:22:41 +00:00
|
|
|
if [ "${karg%%=*}" = "BOOTIF" ]; then
|
2010-06-04 13:32:43 +00:00
|
|
|
export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=01:}"|awk '{print $1}'`
|
2010-05-04 18:22:41 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
if [ -z "$PRINIC" ]; then
|
|
|
|
export PRINIC=eth0
|
|
|
|
fi
|
2009-05-12 20:14:28 +00:00
|
|
|
fi
|
|
|
|
IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}')
|
|
|
|
if [ -z $IP ]
|
|
|
|
then
|
|
|
|
dhclient eth0
|
|
|
|
IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}')
|
|
|
|
fi
|
|
|
|
echo "search #TABLE:site:key=domain:value#" >/etc/resolv.conf
|
|
|
|
for i in $(echo #TABLE:site:key=nameservers:value# | tr ',' ' ')
|
|
|
|
do
|
|
|
|
echo "nameserver $i"
|
|
|
|
done >>/etc/resolv.conf
|
|
|
|
|
|
|
|
hostname $HOSTNAME
|
|
|
|
#
|
|
|
|
# Run xCAT post install
|
|
|
|
#
|
|
|
|
export MASTER_IP="#XCATVAR:XCATMASTER#"
|
|
|
|
export MASTER_IPS="#XCATVAR:XCATMASTER#"
|
|
|
|
export MASTER="#XCATVAR:XCATMASTER#"
|
2011-08-16 19:30:27 +00:00
|
|
|
cd /tmp
|
2009-05-12 20:14:28 +00:00
|
|
|
mkdir -p /xcatpost
|
2009-05-21 20:20:36 +00:00
|
|
|
service portmap start
|
|
|
|
ifconfig
|
|
|
|
cat /etc/resolv.conf
|
2009-05-12 20:14:28 +00:00
|
|
|
mount $MASTER_IP:/install/postscripts /xcatpost
|
|
|
|
cd /xcatpost
|
2013-03-04 21:56:58 +00:00
|
|
|
export PATH=$PATH:/xcatpost
|
2009-05-12 20:14:28 +00:00
|
|
|
export NODE=#TABLE:nodelist:THISNODE:node#
|
|
|
|
export OSVER=#TABLE:nodetype:THISNODE:os#
|
|
|
|
export ARCH=#TABLE:nodetype:THISNODE:arch#
|
|
|
|
syslog
|
2009-05-21 21:03:02 +00:00
|
|
|
#remoteshell this has been added in setupesx
|
|
|
|
setupntp
|
2009-05-12 20:14:28 +00:00
|
|
|
setupesx $HOSTNAME
|
2009-05-21 20:20:36 +00:00
|
|
|
updateflag.awk $MASTER #TABLE:site:key=xcatiport:value#
|
2009-05-12 20:14:28 +00:00
|
|
|
umount /xcatpost
|
|
|
|
cd /
|
|
|
|
exit 0
|