Mailinglist Archive: opensuse-softwaremgmt (12 mails)

< Previous Next >
Re: [softwaremgmt] [10.2]: Zypper and output redirection.
  • From: Lars Behrens <lars.behrens@xxxxxxxxx>
  • Date: Tue, 14 Aug 2007 15:30:07 +0200
  • Message-id: <200708141530.07913.lars.behrens@xxxxxxxxx>
Am Tuesday 14 August 2007 14:50 schrieb Christian Boltz:

> > the error messages, which I want to receive from cron. But after a
> > bit of tinkering, it seems to me that zypper uses stderr for both
> > stderr *and* stdout.
> >
> > So I have to find a different way to inform me about failed upgrades.
>
> Proof of concept:
>
> output="`zypper up 2>&1`" || {
>     echo "$output" | mail -s "update failed" root@localhost
> }

Yepp, somthing like that. But that doesn't seem to be very safe either, eg. 
zypper exits with 0 even when I run it as user (according to man page it 
should exit with 5).

Cheerz Lars
-- 
To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-softwaremgmt+help@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups