]> git.sur5r.net Git - bacula/bacula/commitdiff
Final changes
authorKern Sibbald <kern@sibbald.com>
Tue, 8 Jun 2004 19:09:53 +0000 (19:09 +0000)
committerKern Sibbald <kern@sibbald.com>
Tue, 8 Jun 2004 19:09:53 +0000 (19:09 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1398 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/scripts/mtx-changer.in

index 3760cae748cabe9ab6d82a183e4245c15f636e00..f25467d434d90f17da598718248329f2707a3eff 100644 (file)
 
 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
       ;;