From 1208e743580dc52d6d6865dedb2148ac00a91eff Mon Sep 17 00:00:00 2001 From: xuweibj Date: Thu, 6 Sep 2018 04:56:25 -0400 Subject: [PATCH] fix issue 5604, delete extra / of rootimgdir --- .../share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 2ce203c78..f6ee043c7 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 @@ -204,7 +204,12 @@ function cleanup() fi # Clean up the ofed iso - if mount | grep -q "$IMGROOTPATH/tmp/ofed/mountpoint"; then + tmp_imgpath=$IMGROOTPATH + while (echo $tmp_imgpath | grep "/$") + do + tmp_imgpath=${tmp_imgpath%/*} + done + if mount | grep -q "$tmp_imgpath/tmp/ofed/mountpoint"; then while ! umount "$IMGROOTPATH/tmp/ofed/mountpoint" do (( ++i > max_retry )) && echo "Umount $IMGROOTPATH/tmp/ofed/mountpoint failed" >&2 && break