help-cfengine
[Top][All Lists]
Advanced

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

Class definitions inside conditionals or loops are not allowed


From: Matt Armstrong
Subject: Class definitions inside conditionals or loops are not allowed
Date: Sun, 16 Feb 2003 23:58:57 -0700
User-agent: Gnus/5.090016 (Oort Gnus v0.16) Emacs/21.2

I just upgraded to 2.0.5 from 2.0.1 and am now getting the following
errors.  I'm not sure how to fix them.

  cf::/var/cfengine/inputs/cfagent.conf:139: Class \
      definitions inside conditionals or loops are not allowed

The relevant section of cfagent.conf is this, where I use
DefineClasses to conditionally have cfagent reload sshd.

  editfiles:

    {
      /etc/ssh/sshd_config

      # Close up a security hole in OpenSSH versions < 3.4.  We never
      # use S/KEY anyway.
      BeginGroupIfNoLineMatching "^ChallengeResponseAuthentication no$"
              DeleteLinesMatching "^ChallengeResponseAuthentication"
              Append "ChallengeResponseAuthentication no"
              DefineClasses "sshd_reload_config"
      EndGroup


The only other mention of sshd_reload_config is:

shellcommands:

    sshd_reload_config::
        "/etc/init.d/ssh reload"

I tried pre-declaring sshd_reload_config like this:

classes:
    sshd_reload_config = ( bogus )

But it didn't work.  I'm just grasping at straws...


-- 
matt




reply via email to

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