[Yum] keeping yum quiet
Brian Long
brilong at cisco.com
Fri Jun 3 11:58:15 UTC 2005
On Fri, 2005-06-03 at 09:42 +0100, Huw Lynes wrote:
> We are using yum via cfengine to keep all our boxes up to date every
> night using a script like below:
>
>
> #yum wrapper so the cfengine gets its umask right
> umask 022
> /usr/bin/yum -y -d 0 -e 0 update yum
> /usr/bin/yum -y -d 0 -e 0 update
>
>
> This is mostly quiet but it still mails warnings when it saves a config
> file as .rpmnew . Which is moderately annoying when 250 machines all
> mail the same message. Obviously I could dump both stdout and stderr to
> /dev/null but I don't want to miss real error messages.
>
> So I was wondering what other people do to get around this?
Hello Huw,
You would get this same output from rpm were you to install the rpm
manually. I imagine yum is just taking stderr from rpmlib and giving it
back to you. Yum probably has no way to know if it's a "real" error or
a simple warning like .rpmnew. If you know you can disregard certain
errors, why not add some egrep logic to your wrapper?
GREP="egrep -v '.rpmnew|second bogus message|third bogus'"
/usr/bin/yum -y -d 0 -e 0 update yum | $GREP
/usr/bin/yum -y -d 0 -e 0 update | $GREP
Just my 2 cents. I'll wait to hear from the masters ;-)
/Brian/
--
Brian Long | | |
IT Data Center Systems | .|||. .|||.
Cisco Linux Developer | ..:|||||||:...:|||||||:..
Phone: (919) 392-7363 | C i s c o S y s t e m s
More information about the Yum
mailing list