]> git.sur5r.net Git - bacula/bacula/blob - bacula/scripts/mtx-changer.conf
License cleanups
[bacula/bacula] / bacula / scripts / mtx-changer.conf
1 #
2 # Copyright (C) 2000-2015, Kern Sibbald
3 # License: BSD 2-Clause
4 #
5 #
6 # This file is sourced by the mtx-changer script every time it runs.
7 #   You can put your site customization here, and when you do an
8 #   upgrade, the process should not modify this file.  Thus you
9 #   preserve your mtx-changer configuration.
10 #
11
12 # Set to 1 if you want to do offline before unload
13 offline=0
14
15 # Set to amount of time in seconds to wait after an offline
16 offline_sleep=0
17
18 # Set to amount of time in seconds to wait after a load
19 load_sleep=0
20
21 # Set to 1 to do an inventory before a status. Not normally needed. 
22 inventory=0
23
24 # If you have a VXA PacketLoader, it might display a different 
25 #  Storage Element line, so try setting the following to 1
26 vxa_packetloader=0
27
28 # Set to 1 if you want debug info written to a log
29 debug_log=0
30
31
32 # mt status output
33 # SunOS     No Additional Sense
34 # FreeBSD   Current Driver State: at rest.
35 # Linux     ONLINE
36 #  Note Debian has a different mt than the standard Linux version. 
37 #    When no tape is in the drive it waits 2 minutes.  
38 #    When a tape is in the drive, it prints user unfriendly output.
39 #  Note, with Ubuntu Gusty (8.04), there are two versions of mt,
40 #    so we attempt to figure out which one.
41 #
42
43 OS=`uname`
44 case ${OS} in
45   SunOS)
46     ready="No Additional Sense"
47     ;;
48   FreeBSD)
49     ready="Current Driver State: at rest."
50     ;;
51   Linux)
52     ready="ONLINE"
53     if test -f /etc/debian_version ; then
54        mt --version|grep "mt-st" >/dev/null 2>&1
55        if test $? -eq 1 ; then
56           ready="drive status"
57        fi
58     fi
59   ;;
60 esac