mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
add -q option for grep
This commit is contained in:
parent
2e549a5fdd
commit
3013dea519
@ -172,7 +172,7 @@ function cleanup()
|
||||
local -i max_retry=99
|
||||
|
||||
if [ "$NODESETSTATE" != "genimage" ]; then
|
||||
if mount | grep "/tmp/ofed/mountpoint"; then
|
||||
if mount | grep -q "/tmp/ofed/mountpoint"; then
|
||||
while ! umount "/tmp/ofed/mountpoint"
|
||||
do
|
||||
(( ++i > max_retry )) && echo "Umount /tmp/ofed/mountpoint failed" >&2 && break
|
||||
@ -189,7 +189,7 @@ function cleanup()
|
||||
fi
|
||||
|
||||
# Clean up the ofed iso
|
||||
if mount | grep "$IMGROOTPATH/tmp/ofed/mountpoint"; then
|
||||
if mount | grep -q "$IMGROOTPATH/tmp/ofed/mountpoint"; then
|
||||
while ! umount "$IMGROOTPATH/tmp/ofed/mountpoint"
|
||||
do
|
||||
(( ++i > max_retry )) && echo "Umount $IMGROOTPATH/tmp/ofed/mountpoint failed" >&2 && break
|
||||
@ -201,7 +201,7 @@ function cleanup()
|
||||
fi
|
||||
|
||||
i=0
|
||||
if mount | grep "$IMGROOTPATH/sys"; then
|
||||
if mount | grep -q "$IMGROOTPATH/sys"; then
|
||||
while ! umount "$IMGROOTPATH/sys"
|
||||
do
|
||||
(( ++i > max_retry )) && echo "Umount $IMGROOTPATH/sys failed" >&2 && break
|
||||
@ -209,7 +209,7 @@ function cleanup()
|
||||
done
|
||||
fi
|
||||
i=0
|
||||
if mount | grep "$IMGROOTPATH/proc"; then
|
||||
if mount | grep -q "$IMGROOTPATH/proc"; then
|
||||
while ! umount "$IMGROOTPATH/proc"
|
||||
do
|
||||
(( ++i > max_retry )) && echo "Umount $IMGROOTPATH/proc failed" >&2 && break
|
||||
@ -217,7 +217,7 @@ function cleanup()
|
||||
done
|
||||
fi
|
||||
i=0
|
||||
if mount | grep "$IMGROOTPATH/dev"; then
|
||||
if mount | grep -q "$IMGROOTPATH/dev"; then
|
||||
while ! umount "$IMGROOTPATH/dev"
|
||||
do
|
||||
(( ++i > max_retry )) && echo "Umount $IMGROOTPATH/dev failed" >&2 && break
|
||||
|
Loading…
x
Reference in New Issue
Block a user