Re: [CentOS] yum check-updates script not working correctly

2011-05-26 Thread brian
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 [05/24/2011 18:53]: >> if [ -f /var/lock/subsys/yum ]; then >> >>if

Re: [CentOS] yum check-updates script not working correctly

2011-05-26 Thread Ljubomir Ljubojevic
Leonard den Ottolander wrote: > Hello Brian, > > On Tue, 2011-05-24 at 18:52 -0400, brian wrote: >> if [ -f /var/lock/subsys/yum ]; then >> >> if [ ${CHECKONLY} = "yes" ];then >> >> /usr/bin/yum-check >> fi >> else >> /usr/bin/yum -R

Re: [CentOS] yum check-updates script not working correctly

2011-05-26 Thread Les Mikesell
On 5/26/2011 11:22 AM, Leonard den Ottolander wrote: > > if [ $C="yes" ]; then > echo "2: $C" > fi > > This will return: > 2: no > > Bash is very peculiar ;) No, it should tokenize this into fields, breaking on the elements in $IFS (normally white space). So you end up with one field and ac

Re: [CentOS] yum check-updates script not working correctly

2011-05-26 Thread Denniston, Todd A CIV NAVSURFWARCENDIV Crane
> -Original Message- > From: centos-boun...@centos.org [mailto:centos-boun...@centos.org] On > Behalf Of Leonard den Ottolander > Sent: Thursday, May 26, 2011 12:23 > To: CentOS mailing list > Subject: Re: [CentOS] yum check-updates script not working correctly > >

Re: [CentOS] yum check-updates script not working correctly

2011-05-26 Thread Leonard den Ottolander
Hello Tod, On Thu, 2011-05-26 at 10:53 -0400, Denniston, Todd A CIV NAVSURFWARCENDIV Crane wrote: > The single '=' sign does assignment, a double '==' does string compare. No, with the spaces around the '=' and the dollar before the variable name this actually is a test not an assignment. But usi

Re: [CentOS] yum check-updates script not working correctly

2011-05-26 Thread Leonard den Ottolander
Hello Brian, On Tue, 2011-05-24 at 18:52 -0400, brian wrote: > 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 >

Re: [CentOS] yum check-updates script not working correctly

2011-05-26 Thread Denniston, Todd A CIV NAVSURFWARCENDIV Crane
> -Original Message- > From: centos-boun...@centos.org [mailto:centos-boun...@centos.org] On > Behalf Of Daniel De Marco > Sent: Thursday, May 26, 2011 8:42 > To: CentOS mailing list > Subject: Re: [CentOS] yum check-updates script not working correctly > > Brian

Re: [CentOS] yum check-updates script not working correctly

2011-05-26 Thread Daniel De Marco
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 [05/24/2011 18:53]: > if [ -f /var/lock/subsys/yum ]; then > > if [ ${CHECKONLY} = "yes" ];then > > /usr/bin/yu

Re: [CentOS] yum check-updates script not working correctly

2011-05-24 Thread Ljubomir Ljubojevic
brian wrote: > #!/bin/sh > > # Pull in sysconfig settings > > . /etc/sysconfig/yum-check > > > if [ -f /var/lock/subsys/yum ]; then > > if [ ${CHECKONLY} = "yes" ];then > > /usr/bin/yum-check > fi > else > /usr/bin/yum -R 10 -e 0

[CentOS] yum check-updates script not working correctly

2011-05-24 Thread brian
Hi all... A few weeks ago, I installed (and configured) the three recommended scripts to run yum update check via cron.daily on my CentOS 5.6 server (a Dell 2650). Although it is clearly configured to "check only", it appears to be updating, instead. Has something (environmentally?) changed