[CentOS] yum check-updates script not working correctly

Thu May 26 12:41:51 UTC 2011
Daniel De Marco <ddm at bartol.udel.edu>

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.

Daniel.

* brian <turbo at talstar.com> [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