2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 19:22:05 +00:00

Merge pull request #5607 from xuweibj/ib

fix issue 5604, delete extra / of rootimgdir
This commit is contained in:
Weihua Hu 2018-09-07 14:29:19 +08:00 committed by GitHub
commit b23ec253be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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