From 76a34b66446e76448ee95f7defa07e5b1d1234f2 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 22 Jun 2010 17:35:42 +0000 Subject: [PATCH] -With the nic coming up spuriously to clear conflicting leases, add a check to prevent activation on the first nic bringup git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6577 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot/overlay/etc/init.d/S10autodetect | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xCAT-nbroot/overlay/etc/init.d/S10autodetect b/xCAT-nbroot/overlay/etc/init.d/S10autodetect index e45962228..54cafb1a9 100755 --- a/xCAT-nbroot/overlay/etc/init.d/S10autodetect +++ b/xCAT-nbroot/overlay/etc/init.d/S10autodetect @@ -91,8 +91,9 @@ fi NICSTOWAIT=`/sbin/ifconfig -a|grep HWaddr|grep ^eth|sed -e 's/ .*//'` #run udhcpc in two ways, to flush out leases with uid and leases without uid, and actually use the results of the more 'linux-like' lease, either way, on exit will release all to hold no leases for nic in $NICSTOWAIT; do + touch /tmp/ignorenic.$nic ifconfig $nic up - (udhcpc -i $nic -R;kill `ps axf|grep "udhcpc -i $nic -R"|awk '{print $1}'`; sleep 1; udhcpc -i $nic -R -C) & + (udhcpc -i $nic -R;kill `ps axf|grep "udhcpc -i $nic -R"|awk '{print $1}'`; sleep 1; rm /tmp/ignorenic.$nic; udhcpc -i $nic -R -C) & done @@ -102,7 +103,7 @@ until [ $extrat = 80 -o -z "$NICSTOWAIT" ]; do sleep 1 extrat=$(($extrat+1)) for nic in $NICSTOWAIT; do - if ifconfig $nic|grep "inet addr"; then + if [ ! -f /tmp/ignorenic.$nic ] && ifconfig $nic|grep "inet addr"; then NICSTOWAIT=`echo $NICSTOWAIT|sed -e s/$nic//` if [ $extrat -gt 45 ]; then echo "Warning: $nic took more than 45 seconds to receive DHCP reply, spanning-tree may not be configured well, examine switch configuration" >> /etc/motd