3 # Bacula interface to mtx autoloader
5 # mtx-changer "changer-device" "command" "slot"
7 # Modified for Adic Scalar 24 with one LTO drive by
8 # M. Ludovic Strappozon
12 # echo "Doing mtx -f $1 $2"
17 # echo "Doing mtx -f $1 $2 $3"
23 # echo "Requested list"
24 # mtx -f $1 status | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$3}" | sed "s/:.*$/ /g" | tr -d "[\r\n]"
25 mtx -f $1 status | grep " *Storage Element [0-9]*:.*Full" | awk "{print \$3 \$4}" | sed "s/Full *\(:VolumeTag=\)*//"
29 # echo "Request loaded"
30 mtx -f $1 status >/tmp/mtx.$$
31 cat /tmp/mtx.$$ | grep "^Data Transfer Element 0:Full" | awk "{print \$7}"
32 cat /tmp/mtx.$$ | grep "^Data Transfer Element 0:Empty" | awk "{print 0}"
37 # echo "Request slots"
38 mtx -f $1 status | grep " *Storage Changer" | awk "{print \$5}"