diff --git a/xCAT-server/share/xcat/install/scripts/post.debian b/xCAT-server/share/xcat/install/scripts/post.debian index 38dc53027..a6cb2f9e3 100644 --- a/xCAT-server/share/xcat/install/scripts/post.debian +++ b/xCAT-server/share/xcat/install/scripts/post.debian @@ -17,7 +17,7 @@ fi IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}') if [ -z $IP ] then - dhclient eth0 + dhclient $PRINIC IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}') fi echo "search #TABLE:site:key=domain:value#" >/etc/resolv.conf diff --git a/xCAT-server/share/xcat/install/scripts/post.esx b/xCAT-server/share/xcat/install/scripts/post.esx index ba5911f67..267a95f83 100644 --- a/xCAT-server/share/xcat/install/scripts/post.esx +++ b/xCAT-server/share/xcat/install/scripts/post.esx @@ -17,7 +17,7 @@ fi IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}') if [ -z $IP ] then - dhclient eth0 + dhclient $PRINIC IP=$(ifconfig $PRINIC | grep inet | awk '{print $2}' | awk -F: '{print $2}') fi echo "search #TABLE:site:key=domain:value#" >/etc/resolv.conf diff --git a/xCAT-server/share/xcat/install/scripts/post.ubuntu b/xCAT-server/share/xcat/install/scripts/post.ubuntu index 20bd8bf01..515437953 100755 --- a/xCAT-server/share/xcat/install/scripts/post.ubuntu +++ b/xCAT-server/share/xcat/install/scripts/post.ubuntu @@ -25,7 +25,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