2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-23 06:25:38 +00:00

fix issue 5604, delete extra / of rootimgdir

This commit is contained in:
xuweibj
2018-09-06 04:56:25 -04:00
parent 6fe47527aa
commit 1208e74358

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