This file is indexed.

/usr/share/doc/bacula-common/examples/autochangers/mtx-changer.Sony-TSL-SA300C is in bacula-common 7.0.5+dfsg-4build1.

This file is owned by root:root, with mode 0o755.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
#
# Bacula interface to mtx autoloader
#
#  This mtx-changer script was contributed by Fryderyk Wlostowski.
#    It works with a Sony TLS-11000 changer, which needs
#     the slot number to do an unload
#
#  mtx-changer "changer-device" "command" "slot"
#
#
MTX=/opt/mtx1.2.17/sbin/mtx
case "$2" in 
   unload)
#     echo "Doing mtx -f $1 $2"
      NR_KASETY=`$MTX -f $1 status | grep "Empty" | tr " "  "~" | tr ":"  "~" | cut -d "~" -f 9`
      $MTX -f $1 $2 $NR_KASETY
      ;;

   load)
#     echo "Doing mtx -f $1 $2 $3"
      $MTX -f $1 $2 $3
      ;;

   list) 
#     echo "Requested list"
      $MTX -f $1 status | grep "^[     ]*Storage Element [0-9]*:.*Full" | awk "{print \$3}" | sed "s/:.*$/ /g" | tr -d "[\r\n]"
      ;;

   loaded)
#     echo "Request loaded"
      $MTX -f $1 status | grep "Empty" | tr " " "~" | tr ":" "~" | cut -d "~" -f 9
      echo 0
      ;;

   slots)
#     echo "Request slots"
      $MTX -f $1 status | grep "[  ]Storage Changer" | awk "{print \$5}"
      ;;
esac