[prev in list] [next in list] [prev in thread] [next in thread] 

List:       centos
Subject:    Re: [CentOS] yum check-updates script not working correctly
From:       brian <turbo () talstar ! com>
Date:       2011-05-26 22:38:52
Message-ID: 4DDED67C.8020508 () talstar ! com
[Download RAW message or body]

On 05/26/2011 08:41 AM, Daniel De Marco wrote:
> 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@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
> 
  Daniel --

      ah.. thanks!   I will correct that on my copy of the script.   As a side note, \
it's not my scripting error -- I copied the  whole set of scripts directly off the \
CentOS Wiki, so somebody with editing privs there might want to make the same \
correction...


  - Brian

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic