From 07192e2bfbd8d421b24491474efc11415759768b Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 16 Jan 2012 14:34:21 +0000 Subject: [PATCH] Fix forced nic discovery in genesis discovery image git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11385 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot2/restart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-nbroot2/restart b/xCAT-nbroot2/restart index f0736629d..80ed81795 100755 --- a/xCAT-nbroot2/restart +++ b/xCAT-nbroot2/restart @@ -6,7 +6,7 @@ if [ ! -z "$FORCENICS" ]; then echo "Forcing down nics aside from $FORCENICS due to discoverynics setting" for pidfile in /var/run/dhclient.*.pid; do NIC=`echo $pidfile|awk -F. '{print $2}'` - if [ ! -z "$NIC" -a "$NIC" != "$FORCENICS" ]; then + if [ ! -z "$NIC" ] && echo $NIC | egrep -v "$FORCENICS"; then dhclient -r -1 -cf /etc/dhclient.conf -pf $pidfile $NIC rm $pidfile ip link set $NIC down @@ -14,7 +14,7 @@ if [ ! -z "$FORCENICS" ]; then done for pidfile in /var/run/dhclient6.*.pid; do NIC=`echo $pidfile|awk -F. '{print $2}'` - if [ ! -z "$NIC" -a "$NIC" != "$FORCENICS" ]; then + if [ ! -z "$NIC" ] && echo $NIC | egrep -v "$FORCENICS"; then dhclient -6 -r -1 -pf $pidfile -lf /var/lib/dhclient/dhclient6.leases $NIC rm $pidfile ip link set $NIC down