help-cfengine
[Top][All Lists]
Advanced

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

Re: anyone running cfengine2 on debian sarge?


From: Armin Wolfermann
Subject: Re: anyone running cfengine2 on debian sarge?
Date: Wed, 30 Jun 2004 16:57:28 +0200
User-agent: Mutt/1.5.6i

* Brendan Strejcek <address@hidden> [30.06.2004 15:16]:
> This is still annoying, since that path needs to show up in update.conf;
> this could be mitigated by a WorkDir special variable, so the string
> /var/cfengine never need appear explicitly. Last time I looked through
> the documentation I could not find something like that. If there does
> not exist a variable like this already, consider this a feature request.

Nice idea. This is the patch:

--- src/cf.defs.h.orig  Wed Jun 23 23:09:20 2004
+++ src/cf.defs.h       Wed Jun 30 16:30:49 2004
@@ -884,6 +884,7 @@ enum vnames 
    cfdefcopy,
    cfredef,
    cfdefpkgmgr,
+   cfworkdir,
    nonexistentvar
    };
 
--- src/varstring.c.orig        Fri Jun 11 11:49:55 2004
+++ src/varstring.c     Wed Jun 30 16:30:45 2004
@@ -103,6 +103,7 @@ char *VVNAMES[] =
    "defaultcopytype",
    "allowredefinitionof",
    "defaultpkgmgr",     /* For packages */
+   "workdir",
    NULL
    };
 
@@ -739,7 +740,15 @@ for (sp = string; /* No exit */ ; sp++) 
              buffer[len] = LISTSEPARATOR;
              buffer[len+1] = '\0';
              break;
-             
+
+         case cfworkdir:
+             if (BufferOverflow(buffer,WORKDIR))
+                {
+                FatalError("Can't expand varstring");
+                }
+             strcat(buffer,WORKDIR);
+            break;
+
          default:
              
              if ((env = GetMacroValue(CONTEXTID,currentitem)) != NULL)
--- doc/cfengine-Reference.texinfo.orig Fri Jun 25 09:22:01 2004
+++ doc/cfengine-Reference.texinfo      Wed Jun 30 16:32:03 2004
@@ -1156,8 +1156,12 @@ Reference manual.
 @vindex underscoreclasses
 
 @item version
-The current version string as defined in the code.
+The current version string as defined in the code. Non-definable.
 @vindex $(version)
+
address@hidden workdir
+The cfengine workdir (@code{/var/cfengine} by default). Non-definable.
address@hidden $(workdir)
 
 @item year
 The current year.





reply via email to

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