From 0dba62260c995c824bb26bad9f8686ee711e963f Mon Sep 17 00:00:00 2001 From: WangXiaoPeng Date: Mon, 6 Jul 2015 03:15:05 -0400 Subject: [PATCH] Make dhclient to get IP for Primary nic instead of static eth0 --- xCAT-server/share/xcat/install/scripts/post.rh.common | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/install/scripts/post.rh.common b/xCAT-server/share/xcat/install/scripts/post.rh.common index cadc45d08..54dd3af5e 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rh.common +++ b/xCAT-server/share/xcat/install/scripts/post.rh.common @@ -38,7 +38,7 @@ fi IP=$(ip addr show dev $PRINIC | grep inet | grep -v inet6 | awk '{print $2}' | head -n 1 | awk -F '/' '{print $1}') if [ -z $IP ] then - dhclient eth0 + dhclient $PRINIC #IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}') IP=$(ip addr show dev $PRINIC | grep inet | grep -v inet6 | awk '{print $2}' | head -n 1 | awk -F '/' '{print $1}') fi