From 5b5ad7d6d76a411d93bf67fe8dc070b46ac6cfe9 Mon Sep 17 00:00:00 2001 From: immarvin Date: Thu, 16 Oct 2014 02:26:27 -0700 Subject: [PATCH] fix defect #4297 PMR 32466,L6Q,000 autoinst file generated hangs install at running postscripts --- xCAT-server/share/xcat/install/scripts/post.rh.common | 8 +++++++- 1 file changed, 7 insertions(+), 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 9ad02fd7a..f7a177061 100644 --- a/xCAT-server/share/xcat/install/scripts/post.rh.common +++ b/xCAT-server/share/xcat/install/scripts/post.rh.common @@ -13,8 +13,14 @@ if [ -z "$PRINIC" ] then for karg in $(cat /proc/cmdline |sed -e 's/-/:/g' -e 's/ /\n/g'); do if [ "${karg%%=*}" = "BOOTIF" ]; then + MACADDR="${karg#*=}"; + #The BOOTIF in pxelinux will be the MAC address with the hardware type code as a prefix + #such as BOOTIF=01-40-f2-e9-68-de-90 + if [ "${#MACADDR}" == "20" ]; then + MACADDR=${MACADDR:3:21} + fi #export PRINIC=`ifconfig -a|grep -i "hwaddr ${karg#*=01:}"|awk '{print $1}'` - export PRINIC=`ip -o link|grep -i "${karg#*=}"|awk '{print $2}'|sed s/://` + export PRINIC=`ip -o link|grep -i "$MACADDR"|awk '{print $2}'|sed s/://` fi done if [ -z "$PRINIC" ]; then