Hi Marc

On Mon, Jul 30, 2007 at 02:42:12PM +0200, Marc Haber wrote:
> On Mon, Jul 30, 2007 at 01:35:36PM +0200, Ola Lundqvist wrote:
> > On Sat, Jul 28, 2007 at 09:33:03AM +0200, Marc Haber wrote:
> > > I have one system that updates clamav-data from cron-apt, and thus
> > > updates multiple times daily. This is implemented by having
> > > /etc/cron-apt/action.d/4-install-clamav-data with the contents
> > > --assume-yes install clamav-data.
> > > 
> > > This, of course, sends mail multiple times daily.
> > > 
> > > It would be great to be able to configure cron-apt to only send mail
> > > if this call of $APTCOMMAND has given a non-zero exit code, as if an
> > > error happened.
> > 
> > Hmm, isn't that the default behaviour?
> > MAILON=error
> 
> I have MAILON=upgrade since I'd like to see messages generated by
> "normal" cron-apt behavior.

I think actually that if you set MAILON=error you will get the result that
you want.

> > > I would be willing to submit a patch once you have indicated which way
> > > to indicate that this action.d item has to be quiet if no error occured.
> > 
> > Or do you want to set this per action?
> 
> Yes, per action.

Ahh well you have /etc/cron-apt/config.d ... Name the configuration file the
same as the action and that setting will have effect only for that one.

/etc/cron-apt/action.d/4-install-clamav-data
        your script here that return non-zero on failure
/etc/cron-apt/config.d/4-install-clamav-data
        MAILON=error
        EXITON=never (if you want that)
/etc/cron-apt/config.d/5-setback
        MAILON=changes
        EXITON=error

For the next action you set it back to what you want to have.

I think it is all there, however maybe not that well documented.
If it is not working like this I think it is a bug, and then not a
wishlist but, but I may have misundertood you. :)

Best regards,

// Ola

> Greetings
> Marc
> 
> -- 
> -----------------------------------------------------------------------------
> Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
> Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
> Nordisch by Nature |  How to make an American Quilt | Fax: *49 3221 2323190
> 

-- 
 --- Ola Lundqvist systemkonsult --- M Sc in IT Engineering ----
/  [EMAIL PROTECTED]                   Annebergsslingan 37        \
|  [EMAIL PROTECTED]                   654 65 KARLSTAD            |
|  http://opalsys.net/               Mobile: +46 (0)70-332 1551 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9  /
 ---------------------------------------------------------------


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to