bug-cfengine
[Top][All Lists]
Advanced

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

Re: Convergence and Include in editfiles


From: Adrian Phillips
Subject: Re: Convergence and Include in editfiles
Date: 01 Jun 2002 09:11:58 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

>>>>> "Andrew" == Andrew Stribblehill <address@hidden> writes:

    Andrew> I think that the folllowing snippet is convergent. Can
    Andrew> anyone convince me otherwise, and preferably show me how
    Andrew> to rewrite it in a convergent manner?

    Andrew> editfiles: redhat:: { /etc/sysconfig/network
    Andrew> BeginGroupIfNoSuchLine "HOSTNAME=$(host)" ReplaceAll
    Andrew> "HOSTNAME=.*" With "HOSTNAME=$(host)" EndGroup
    Andrew> DefineClasses "changeHostname" }

Hmm, if you've alrady got BeginGroupIfNoSuchLine "HOSTNAME=$(host)",
perhaps DeleteLinesMatching "HOSTNAME=.*", then Append
"HOSTNAME=$(host)" ?


    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:
Sorry, can't help with this off the top of my head,

Sincerely,

Adrian Phillips

-- 
Your mouse has moved.
Windows NT must be restarted for the change to take effect.
Reboot now?  [OK]



reply via email to

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