X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=changer-src%2Fchg-zd-mtx.sh;h=84c8f85697145a2e5cd3a59860e27cc06ef1f9d3;hb=fd48f3e498442f0cbff5f3606c7c403d0566150e;hp=dd26273daf9cdc607b6a35c0d3f2eb55d62c4f4f;hpb=96f35b20267e8b1a1c846d476f27fcd330e0b018;p=debian%2Famanda diff --git a/changer-src/chg-zd-mtx.sh b/changer-src/chg-zd-mtx.sh index dd26273..84c8f85 100644 --- a/changer-src/chg-zd-mtx.sh +++ b/changer-src/chg-zd-mtx.sh @@ -1220,10 +1220,17 @@ loadslot() { shift done if [ $# -le 0 ]; then - Exit 2 \ - `_ ''` \ - `_ '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 \ + `_ ''` \ + `_ 'Cannot find a tape in slot %s' "$find_slot "` + return $? # in case we are internal + else + Exit 2 \ + `_ ''` \ + `_ '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. @@ -1474,7 +1481,7 @@ searchtape() { 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 \ `_ ''` \ `_ '%s: label "%s" not found in %s' "$tapelabel" "$tapelabel" "$labelfile"` return $? # in case we are internal @@ -1497,7 +1504,7 @@ searchtape() { 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 \ `_ ''` \ `_ 'barcode "%s" not found in mtx status output' "$labelfile_barcode"` return $? # in case we are internal