Skip to content

Commit

Permalink
Merge pull request #897 from bareos/dev/fbergkemper/master/mtx-change…
Browse files Browse the repository at this point in the history
…r-debug

core: improve mtx-changer debug output
  • Loading branch information
pstorz committed Aug 10, 2021
2 parents e02d17e + ab5f9ca commit e9a54e5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/scripts/mtx-changer.in
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,13 @@ make_err_file() {
wait_for_drive() {
i=0
while [ $i -le 300 ]; do # Wait max 300 seconds
if mt -f $1 status 2>&1 | grep "${ready}" >/dev/null 2>&1; then
debug "Doing mt -f $1 status ..."
drivestatus=$(mt -f "$1" status 2>&1)
if echo "${drivestatus}" | grep "${ready}" >/dev/null 2>&1; then
break
fi
debug "Device $1 - not ready, retrying..."
debug "${drivestatus}"
debug "Device $1 - not ready, retrying ..."
sleep 1
i=`expr $i + 1`
done
Expand Down

0 comments on commit e9a54e5

Please sign in to comment.