3 # Create two blank tapes
8 ready="No Additional Sense"
11 ready="Current Driver State: at rest."
19 while [ $i -le 300 ]; do # Wait max 300 seconds
20 if mt -f $1 status | grep ${ready} >/dev/null 2>&1; then
23 # debug "Device $1 - not ready, retrying..."
30 # mt -f @tape_drive@ offline
31 @changer_path@ -f @autochanger@ unload
32 @changer_path@ -f @autochanger@ load 1
33 wait_for_drive @tape_drive@
34 mt -f @tape_drive@ rewind
35 mt -f @tape_drive@ weof
36 @changer_path@ -f @autochanger@ unload
37 @changer_path@ -f @autochanger@ load 2
38 wait_for_drive @tape_drive@
39 mt -f @tape_drive@ rewind
40 mt -f @tape_drive@ weof
41 #@changer_path@ -f @autochanger@ unload