On Tue, 12 Dec 2000, John R. Jackson wrote:

> >Does amdump exit with a nonzero status on some errors now?  ...
>
> A simple "tail amdump" shows it always exits with a zero.  Only very

Shame on me. "Use the Source, Luke!".

To be specific, amdump is a shell script and:

---------------------------------------------------
amanda$ grep -B2 "exit" /usr/local/amanda/sbin/amdump
if [ $# -ne 1 ]; then
        echo  Usage: amdump$SUF conf
        exit 1
--
if [ ! -d $confdir/$conf ]; then
    echo "amdump$SUF: could not find directory $confdir/$conf"
    exit 1
--
if [ $runuser != $dumpuser ]; then
        echo "amdump: must be run as user $dumpuser"
        exit 1
--
if test -f $errfile || test -f $logdir/log; then
        echo "amdump: amdump or amflush is already running, or you must
run amcleanup" >&2
        exit 1
--
$libexecdir/amtrmidx$SUF $conf

exit 0
---------------------------------------------------

So, using the "amdump && mt offline" really only fails for the above
reasons. If something weird happens during the dump, one should rely on
the status report, not the fact that the tape still in the drive (though
that would indicate something fundamental is wrong as John noted).

Later,

Bill Carlson
-- 
Systems Programmer    [EMAIL PROTECTED]    |  Opinions are mine,
Virtual Hospital      http://www.vh.org/        |  not my employer's.
University of Iowa Hospitals and Clinics        |

Reply via email to