Re: yum check-updates script not working correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



> -----Original Message-----
> From: centos-bounces@xxxxxxxxxx [mailto:centos-bounces@xxxxxxxxxx] On
> Behalf Of Daniel De Marco
> Sent: Thursday, May 26, 2011 8:42
> To: CentOS mailing list
> Subject: Re:  yum check-updates script not working correctly
> 
> Brian,
> 
> you have a syntax error in the second if. The yum update is being
> executed every time. Move the fi just before the else to the end.
> 


Make that, a probable, two syntax errors in the second if.
The single '=' sign does assignment, a double '==' does string compare.

Plus I think there is a simpler way to control yum, than adding all
these scripts that I don't think came in the base install.  Modify
/etc/yum/yum-updates.conf, which comes in the yum-updatesd package, and 
`ckconfig yum-updatesd on` #note you probably only want one or the other
of either yum-updatesd or the scripts you have.

On some of the systems I run, the run_interval is set ~22000 and
do_update is set to no, which achieves near what I think the OP was
after.
I am not sure if setting emit_via to email or syslog would get the final
bit of what the OP was after.


> Daniel.
> 
> * brian <turbo@xxxxxxxxxxx> [05/24/2011 18:53]:
> > if [ -f /var/lock/subsys/yum ]; then
> >
> >           if [ ${CHECKONLY} = "yes" ];then
> >
> >                  /usr/bin/yum-check
> >           fi
> >           else
> >                  /usr/bin/yum -R 10 -e 0 -d 0 -y update yum
> >                  /usr/bin/yum -R 120 -e 0 -d 0 -y update
> > fi

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux