From: Kern Sibbald Date: Tue, 8 Jun 2004 19:09:53 +0000 (+0000) Subject: Final changes X-Git-Tag: Release-1.34.3~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c44199a547a3c66b23851b5f0b2831d2c4552ef8;p=bacula%2Fbacula Final changes git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1398 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/scripts/mtx-changer.in b/bacula/scripts/mtx-changer.in index 3760cae748..f25467d434 100644 --- a/bacula/scripts/mtx-changer.in +++ b/bacula/scripts/mtx-changer.in @@ -29,6 +29,14 @@ MTX=@MTX@ +wait_for_drive() { + while ! mt -f $1 status >/dev/null 2>&1; do +# echo "Device $1 - not ready, retrying..." + sleep 5 + done +} + + if test $# -lt 2 ; then echo "usage: mtx-changer ctl-device command slot archive-device drive" echo " Insufficient number of arguments arguments given." @@ -90,6 +98,8 @@ case $cmd in rtn=$? # # Increase the sleep time if you have a slow device +# or remove the sleep and add the following: +# wait_for_drive $device sleep 15 exit $rtn ;;