diff --git a/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 b/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 index cc1970044..2ce203c78 100755 --- a/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 +++ b/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 @@ -218,11 +218,11 @@ function cleanup() i=0 if mount | grep -q "$IMGROOTPATH/sys"; then while ! umount "$IMGROOTPATH/sys" - do + do (( ++i > max_retry )) && echo "Umount $IMGROOTPATH/sys failed" >&2 && break sleep 1 done - fi + fi i=0 if mount | grep -q "$IMGROOTPATH/proc"; then while ! umount "$IMGROOTPATH/proc" @@ -230,7 +230,7 @@ function cleanup() (( ++i > max_retry )) && echo "Umount $IMGROOTPATH/proc failed" >&2 && break sleep 1 done - fi + fi i=0 if mount | grep -q "$IMGROOTPATH/dev"; then while ! umount "$IMGROOTPATH/dev" @@ -260,10 +260,10 @@ if [ "$OS" = "Linux" ]; then echo "[Error] please make your $HOSTNAME has ability to access ports.ubuntu.com" >&2 exit 1 fi - + echo "get distro name form /etc/lsb-release ......" - source /etc/lsb-release >/dev/null 2>&1 + source /etc/lsb-release >/dev/null 2>&1 if [ -z "$DISTRIB_CODENAME" ]; then echo "[Error] can't get DISTRIB_CODENAME " >&2 exit 1 @@ -357,7 +357,7 @@ EOF mount --bind /sys "$IMGROOTPATH/sys/" hack_uname "${IMGROOTPATH}" - + # Being called from .postinstall script # Assume we are on the same machine if [ -f /etc/SuSE-release ]; then @@ -377,9 +377,9 @@ EOF sourceslist="$IMGROOTPATH/etc/apt/sources.list" cp "$sourceslist" "${sourceslist}.bak" - + echo "get distro name form $IMGROOTPATH/etc/lsb-release ......" - source $IMGROOTPATH/etc/lsb-release >/dev/null 2>&1 + source $IMGROOTPATH/etc/lsb-release >/dev/null 2>&1 if [ -z "$DISTRIB_CODENAME" ]; then echo "[Error] can't get DISTRIB_CODENAME " >&2 exit 1