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
This commit is contained in:
jbjohnso 2012-01-16 14:34:21 +00:00
parent 024023acc3
commit 07192e2bfb

View File

@ -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