[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Convergence and Include in editfiles
From: |
Andrew Stribblehill |
Subject: |
Re: Convergence and Include in editfiles |
Date: |
Tue, 18 Jun 2002 10:26:41 +0100 |
User-agent: |
Mutt/1.4i |
Quoting address@hidden <address@hidden> (2002-06-18 09:40:47 BST):
>
> >> Andrew> The other question is: should the following be okay?
> >>
> >> Andrew> editfiles: { /etc/xinetd.d Include 'finger' Include 'rsh'
> >> Andrew> Include 'rlogin' Include 'rexec' Include 'telnet' Include
> >> Andrew> 'daytime' HashCommentLinesStarting '$(tab)disable'
> >> Andrew> DefineClasses 'hupXinetd' }
> >>
> >> Andrew> When I run this, I get the following (cfagent -ngq)
> >> Andrew> output:
> >>
> >> Andrew> cfengine:angel: Unknown action in editing of file
> >> Andrew> /etc/xinetd.d/daytime cfengine:angel: Unknown action in
> >> Andrew> editing of file /etc/xinetd.d/daytime cfengine:angel:
> >
> > I'm pretty sure this is a long-standing bug in cfagent from before
> > the 2.0 days. It was doing this in 1.6 but I didn't feel ready to
> > report it, since I couldn't test on 2.0 at that point.
>
> I am not sure what this is about. I tried the stanza you quote and
> it parsed ok for me...with the versions I have, so either this
> has been recently fixed, or our wires are crossed??
One of the fixes I sent you fixed this. The problem was that Include
wasn't counted as a valid non-editing command in edittools.c'
DoEditFile() function, at line ~425.
The patch was:
--- cfengine2-2.0.2.orig/src/edittools.c
+++ cfengine2-2.0.2/src/edittools.c
@@ -425,7 +425,12 @@
case EditBackup:
case EditUmask:
case AutoCreate:
- break;
+ case EditInclude:
+ case EditExclude:
+ case EditFilter:
+ case DefineClasses:
+ case ElseDefineClasses:
+ break;
case EditUseShell:
if (strcmp(expdata,"false") == 0)
@@ -1055,11 +1060,6 @@
case AppendToLineIfNotContains:
AppendToLine(CURRENTLINEPTR,expdata,filename);
- break;
-
- case EditFilter:
- case DefineClasses:
- case ElseDefineClasses:
break;
default: snprintf(OUTPUT,bufsize*2,"Unknown action in editing of file
%s\n",filename);
--------------------
Thanks,
Andrew.
--
SOUTHEAST FITZROY
VARIABLE 3 BECOMING NORTHERLY 4 OR 5, OCCASIONALLY 6 NEAR CAPE
FINISTERRE. MAINLY FAIR. MODERATE OR GOOD