Updating antivir via cron results in failure

Hello, everyone. I know this question concerns SLOX4.1, but nobody on that list could help, and it is a fairly general question. On my SLOX4.1 box, I am using antivir to scan for virii. I haven't had much luck finding the auto-update program, but manually running antivir --update works fine, so I decided to just set this up to run as a cron job. As such, I added a small script to cron.daily that does nothing more than invoke the above command. Every morning, after an update, I get two emails. One of these is from antivir letting me know that the update worked fine. The other email is from cron letting me know that the job failed, thus: ---------------------------------------------------------------------------- --------- running daily cronjob scripts SCRIPT: antivir_update exited with RETURNCODE = 1. SCRIPT: ouput (stdout && stderr) follows AntiVir / Linux Version 2.1.1-25 Copyright (c) 1994-2004 by H+BEDV Datentechnik GmbH. All rights reserved. checking for updates 06.27.00.86 <=> 06.28.00.03 [vdf database, loaded] 06.27.00.86 <=> 06.28.00.03 [vdf database, on-disk] 06.27.00.12 <=> 06.28.00.03 [scan engine, running] 06.27.00.12 <=> 06.28.00.03 [scan engine, on-disk] downloading antivir.vdf... 00%downloading antivir.vdf... 02%downloading antivir.vdf... 06%downloading antivir.vdf... 07%downloading antivir.vdf... 10%downloading antivir.vdf... 12%downloading antivir.vdf... 15%downloading antivir.vdf... 20%downloading antivir.vdf... 25%downloading antivir.vdf... 28%downloading antivir.vdf... 31%downloading antivir.vdf... 35%downloading antivir.vdf... 38%downloading antivir.vdf... 40%downloading antivir.vdf... 44%downloading antivir.vdf... 46%downloading antivir.vdf... 49%downloading antivir.vdf... 53%downloading antivir.vdf... 55%downloading antivir.vdf... 56%downloading antivir.vdf... 60%downloading antivir.vdf... 61%downloading antivir.vdf... 62%downloading antivir.vdf... 63%downloading antivir.vdf... 66%downloading antivir.vdf... 69%downloading antivir.vdf... 74%downloading antivir.vdf... 79%downloading antivir.vdf... 81%downloading antivir.vdf... 84%downloading antivir.vdf... 88%downloading antivir.vdf... 93%downloading antivir.vdf... 95%downloading antivir.vdf... 98%downloading antivir.vdf... 100% downloading antivir... 00%downloading antivir... 18%downloading antivir... 81%downloading antivir... 100% 06.28.00.03 <=> 06.28.00.03 [vdf database, on-disk] 06.28.00.03 <=> 06.28.00.03 [scan engine, on-disk] scan engine 06.27.00.12 --> 06.28.00.03 (/usr/lib/AntiVir/antivir) vdf database 06.27.00.86 --> 06.28.00.03 (/usr/lib/AntiVir/antivir.vdf) AntiVir updated successfully SCRIPT: antivir_update ------- END OF OUTPUT SCRIPT: clean_catman, OK. SCRIPT: do_mandb, OK. SCRIPT: logrotate, OK. SCRIPT: ouput (stdout && stderr) follows Reload syslog service..done SCRIPT: logrotate ------- END OF OUTPUT SCRIPT: slots, OK. SCRIPT: suse.de-backup-rc.config, OK. SCRIPT: suse.de-backup-rpmdb, OK. SCRIPT: suse.de-check-battery, OK. SCRIPT: suse.de-clean-tmp, OK. SCRIPT: suse.de-clean-vi, OK. SCRIPT: suse.de-cron-local, OK. ---------------------------------------------------------------------------- --------- As you can see, the actual update is working, but it seems that I need to adjust something so that cron knows it was successful. My scripting knowledge is fairly limited, so I hope one of you can point me in the right direction. I expect the emails from antivir to continue to show up, but I'd like to only get the ones from cron when the jobs genuinely fail. Thanks, Stuart.

On Wednesday 06 October 2004 18:20, Powell, Stuart wrote:
[snipping output]
/usr/share/doc/packages/antivir/README search for the string 'Internet Updates' The answer is 36 lines lower; there is also a mention of a special update program. Cheers, Leen

The 2004-10-06 at 12:20 -0400, Powell, Stuart wrote:
SCRIPT: antivir_update exited with RETURNCODE = 1. SCRIPT: ouput (stdout && stderr) follows
When a cron job returns with something not zero, it assumes some failure and emails you the output tex, so that you decide what to do. The script antivir_update is the culprit, it is not returning a zero value. Change that. -- Cheers, Carlos Robinson

On Wednesday 06 October 2004 16:46, Carlos E. R. wrote:
To elaborate on Carlos's answer, you probably ought review the script carefully to see why it returns a "1" before changing the script itself. It could be that the script intends to print a message to stdout (OK to change it) or there may be a silent failure someplace in the script (unable to update a log file for example) that's causing the return code of "1". In this case it's better to fix the problem. Even though I didn't see any error messages in your printout, it's always good to check this sort of thing first. Jeff
participants (4)
-
Carlos E. R.
-
Jeffrey Laramie
-
Leendert Meyer
-
Powell, Stuart