Skip to content

Commit

Permalink
use >&/dev/null
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed Sep 18, 2019
1 parent fd5d300 commit 7fb34ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/fai-diskimage
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ cleanup() {
for dir in $(mount | awk '{print $3}'| grep $mnt | sort -r); do
# try umount several times, because some postinst jobs may still run and use the filesystems
for i in {1..8}; do
umount $dir >/dev/null 2>&1
umount $dir >&/dev/null
[ $? -eq 0 ] && break
[ $(($i % 3)) -eq 0 ] && echo "Waiting for background jobs to finish."
sleep $i
Expand Down
2 changes: 1 addition & 1 deletion bin/fai-make-nfsroot
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ if [ $sshpreserve -ge 1 ]; then
fi

if [ -d $NFSROOT/proc ]; then
umount $NFSROOT/dev/pts 1>/dev/null 2>&1 || true
umount $NFSROOT/dev/pts >&/dev/null || true
[ -L $NFSROOT/proc/self ] && umount $NFSROOT/proc || true
[ -L $NFSROOT/proc/self ] && die 1 "/proc is still mounted inside the nfsroot."
umount $NFSROOT/$MNTPOINT 2>/dev/null || true # it's safer to try to umount
Expand Down

0 comments on commit 7fb34ab

Please sign in to comment.