[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] client/ext yum update notifier extension script
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] client/ext yum update notifier extension script
- From: Christoph Berg <cb (at) df7cb.de>
- Date: Wed, 3 Jun 2009 11:18:12 +0200
- References: <6B73AB901767CA49B818C7A071E03FAC0CF0CA (at) exchange.nh.local>
- User-agent: Mutt/1.5.19 (2009-01-05)
Re: netz-haut - stephan seitz 2009-06-03 <6B73AB901767CA49B818C7A071E03FAC0CF0CA (at) exchange.nh.local>
> As we're going to setup some new Machines with CentOS, I'ld like to ask if someone already did a similar
> extension script for yum/rpm?
Here's an ugly one:
#!/bin/sh
COLOR='yellow'
# strip CR
MACHINE=`echo $MACHINE`
yum check-update > $BBTMP/yum.out 2>&1
EXIT="$?"
[ "$EXIT" = "0" ] && COLOR='green'
egrep -q -i '^(Error|Cannot)' $BBTMP/yum.out && COLOR="red"
( echo status $MACHINE.yum $COLOR `date`
cat $BBTMP/yum.out ) | $BB $BBDISP @
rm $BBTMP/yum.out
Christoph
--
cb (at) df7cb.de | http://www.df7cb.de/