On 9/20/07, Marc Muehlfeld < Marc.Muehl
feld%40medizinische-genetik.de">Marc.Muehlfeld
medizinische-genetik.de> wrote:
> I tried to find a better solution than my last one to improve errorhandling in
> amdump.
This worked in my test environment, and properly output a one-line
error message when necessary.
My questions:
1. Is this always desirable behavior? Are there cases where this new
feature would simply be a bother to an admin? Will the combination of
mailing and sending the error message send duplicate messages in the
common case of amdump running from cron, with cron configured to email
stderr/stdout to the admin?
2. The config name needs to be extracted from the config file, instead
of hardcoded, in lines like:
echo "$ERRMSG" | $MAILER -s "ERROR KDD AMANDA REPORT FOR `date +%B"
"%e", "%Y`" "$MAILTO"
3. If MAILER is not set, then Amanda should continue to operate, but
simply not send mail.
4. "echo -e" is not portable. See e.g.,
http://bugs.hylafax.org//show_bug.cgi?id=724. Writing portable shell
is tough!
4. Although JLM or I can take care of this when the change gets
committed, it would be helpful if you could develop from the HEAD
version of amdump, which has a number of changes from the version
you're working with. The HEAD version should drop in fairly easily
over the version you're using, with the addition of
common-src/amanda-sh-lib.sh.
Dustin
--
Storage Software Engineer
http://www.zmanda.com