bug-cfengine
[Top][All Lists]
Advanced

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

Re: Patch: -K passed to a method call


From: Christian Pearce
Subject: Re: Patch: -K passed to a method call
Date: Wed, 23 Mar 2005 14:56:23 -0500

I know the following is dog food to look at but is their more to this
locking with methods?  Seems I can get the method to run with our
checking locks.  But it will not return a success class.  This isn't
good.  I am attaching my example.  Try running it once.  and then run it
with the -K.  You will notice it runs the runls but does not return
success.   I don't fully understand how variables and classes are
passed.



bash-2.05b$ /home/pearcec/.cfagent/bin/cfagent  -I
cfengine:: Executing method /home/pearcec/.cfagent/bin/cfagent
-f /home/pearcec/.cfagent/modules/cf.runls -I -Z
MD5=be180c8a9b6dff00bb97baddc0dbe860 ...(uid=-1,gid=-1)
cfengine::runls: cfengine:: Executing script /bin/ls
-l...(timeout=0,uid=-1,gid=-1)
cfengine::runls: cfengine::/bin/ls -l: total 4
cfengine::runls: cfengine::/bin/ls -l: -rw-r--r--  1 pearcec users 312
Mar 23 12:47 cfagent.conf
cfengine::runls: cfengine:: Finished script /bin/ls -l
cfengine:: Finished local method /home/pearcec/.cfagent/bin/cfagent
-f /home/pearcec/.cfagent/modules/cf.runls -I -Z
MD5=be180c8a9b6dff00bb97baddc0dbe860  processing
bash-2.05b$ /home/pearcec/.cfagent/bin/cfagent  -I -K
cfengine:: Executing method /home/pearcec/.cfagent/bin/cfagent
-f /home/pearcec/.cfagent/modules/cf.runls -I -K -Z
MD5=be180c8a9b6dff00bb97baddc0dbe860 ...(uid=-1,gid=-1)
cfengine::runls: cfengine:: Executing script /bin/ls
-l...(timeout=0,uid=-1,gid=
cfengine::runls: cfengine::/bin/ls -l: total 4
cfengine::runls: cfengine::/bin/ls -l: -rw-r--r--  1 pearcec users 312
Mar 23 12:47 cfagent.conf
cfengine::runls: cfengine:: Finished script /bin/ls -l
cfengine:: Finished local method /home/pearcec/.cfagent/bin/cfagent
-f /home/pearcec/.cfagent/modules/cf.runls -I -K -Z
MD5=be180c8a9b6dff00bb97baddc0dbe860  processing
cfengine:: failed to runls -l
bash-2.05b$ /home/pearcec/.cfagent/bin/cfagent  -I   




On Wed, 2005-03-23 at 20:02 +0100, Mark Burgess wrote:
> Quoting Christian Pearce <address@hidden>:
> 
> > If I pass -K when running cfagent it should in turn pass this to the
> > cfagent call to execute the module.  At least this is how I see it.
> > here is a patch to fix it.
> > 
> > --- methods.c.orig      2005-03-09 14:41:43.000000000 -0500
> > +++ methods.c   2005-03-23 12:30:54.892255784 -0500
> > @@ -274,6 +274,11 @@
> >     strcat(options,"-I ");
> >     }
> >  
> > +if (IGNORELOCK)
> > +   {
> > +   strcat(options,"-K ");
> > +   }
> > +
> >  if (VERBOSE)
> >     {
> >     strcat(options,"-v ");
> > 
> > -- 
> > Christian Pearce
> > http://www.sysnav.com
> > http://www.commnav.com
> > http://www.perfectorder.com
> > 
> 
> Thanks - applied
> 
> M
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Work: +47 22453272            Email:  address@hidden
> Fax : +47 22453205            WWW  :  http://www.iu.hio.no/~mark
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> 
> 
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
-- 
Christian Pearce
http://www.sysnav.com
http://www.commnav.com
http://www.perfectorder.com

Attachment: example.tar
Description: Unix tar archive

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]