shift
done
if [ $# -le 0 ]; then
- Exit 2 \
- `_ '<none>'` \
- `_ 'Cannot find slot %s in slot list (%s)' "$find_slot " "$slot_list"`
- return $? # in case we are internal
+ if [ $find_slot -ge $firstslot -a $find_slot -le $lastslot ]; then
+ Exit 2 \
+ `_ '<none>'` \
+ `_ 'Cannot find a tape in slot %s' "$find_slot "`
+ return $? # in case we are internal
+ else
+ Exit 2 \
+ `_ '<none>'` \
+ `_ 'Cannot find slot %s in slot list (%s)' "$find_slot " "$slot_list"`
+ return $? # in case we are internal
+ fi
fi
# Determine the slot to load.
if [ $labelfile_entry_found -eq 0 ]; then
LogAppend `_ ' -> !!! label "%s" not found in %s !!!' "$tapelabel" "$labelfile"`
LogAppend `_ ' -> Remove %s and run "%s %s update"' "$labelfile" "$sbindir/amtape" "$config"`
- Exit 2 \
+ Exit 1 \
`_ '<none>'` \
`_ '%s: label "%s" not found in %s' "$tapelabel" "$tapelabel" "$labelfile"`
return $? # in case we are internal
if [ -z "$foundslot" ]; then
LogAppend `_ 'ERROR -> !!! Could not find slot for barcode "%s"!!!' "$labelfile_barcode"`
LogAppend `_ ' -> Remove %s and run "%s %s update"' "$labelfile" "$sbindir/amtape" "$config"`
- Exit 2 \
+ Exit 1 \
`_ '<none>'` \
`_ 'barcode "%s" not found in mtx status output' "$labelfile_barcode"`
return $? # in case we are internal