Hello, on Dienstag, 14. August 2007, Lars Behrens wrote:
Am Monday 13 August 2007 18:00 schrieben Sie:
try zypper up 2> /dev/null the 2 is for standard error instead of standard output.
Normally that would be the opposite of what I want, as it would kill 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 }
Did you use exit codes, too?
No, but it seems that I have to :-)
See above ;-) BTW: For those who are interested in mailed update notifications (without unstalling the patches), patch2mail in my home:cboltz buildservice repo might be useful. Regards, Christian Boltz --
Ohh jee ... ich will mein yast1 wieder *heul* :-)) Ich hab's noch, ich hab's noch... *freu* *hüpf* *SuSE 7.3 behalt* Bleib mir weg mit deiner neumodischen 7.sonstwas! [>> Konrad Neitzel, > Florian Gross und David Haller in suse-linux] -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org