help-cfengine
[Top][All Lists]
Advanced

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

Re: Disabling iterators in shellcommands


From: Eric Sorenson
Subject: Re: Disabling iterators in shellcommands
Date: Fri, 10 Jun 2005 15:05:14 -0700 (PDT)

I sent in this patch a while back,  thought it got included ?


Index: cf.defs.h
===================================================================
--- cf.defs.h   (revision 46)
+++ cf.defs.h   (working copy)
@@ -879,6 +879,7 @@
    cfcr,
    cfn,
    cfdblquote,
+   cfcolon,
    cfquote,
    cfdollar,
    cfrepchar,
Index: varstring.c
===================================================================
--- varstring.c (revision 46)
+++ varstring.c (working copy)
@@ -79,6 +79,7 @@
    "cr",
    "n",
    "dblquote",
+   "colon",
    "quote",
    "dollar",
    "repchar",
@@ -695,6 +696,15 @@
                 }
              strcat(buffer,"\'");
              break;
+
+        case cfcolon:
+             if (ExpandOverflow(buffer," "))
+                { 
+                FatalError("Can't expandvarstring");
+                }
+             strcat(buffer,":");
+             break;
+
              
          case cfdollar:
              

-- 
 - Eric Sorenson - N37 17.255 W121 55.738 - http://eric.explosive.net -
 - Personal colo with a professional touch - http://www.explosive.net -


On Thu, 9 Jun 2005, Mark Burgess wrote:

> 
> Change the SplitOn value
> 
> M
> 
> On Thu, 2005-06-09 at 10:10 +0200, Alexander Mattausch wrote:
> > Hello,
> > 
> > is there a way to disable iterators in a shellcommand? I have the
> > following code:
> > 
> > control:
> >   var = ( "a:b:c" )
> > 
> > shellcommands:
> >   "/some/program $(var)"
> > 
> > and $(var) should be passed unchanged to /some/program. I know that I
> > could change the character which separates the list, but this would
> > break all my intended iterators. Does the variable $(colon) as a 
> > replacement for ":" exist (I haven't found anything)?
> > 
> > Any ideas?
> > 
> > Thanks,
> > Alex




reply via email to

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