bug-cfengine
[Top][All Lists]
Advanced

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

AppendIfNoLineMatching wierdness in 2.0.6


From: Chip Seraphine
Subject: AppendIfNoLineMatching wierdness in 2.0.6
Date: Wed, 16 Apr 2003 16:40:20 -0500
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.2.1) Gecko/20030121


Seeing some wierd behavior in 2.0.6 under Solaris 2.8/intel....

The snippet below puts the matching pattern from AppendIfNoLineMatching
into the target file instead of the SetLine value:

        { /tmp/root-crontab
                SetLine "5 0,6,12,18 * * * /opt/cfengine/bin/cfsplay"
                AppendIfNoLineMatching "^.*cfsplay.*$"
                SplitOn " "
                ReplaceLinesMatchingField 6
                
                #line below is not really wrapped, that is just my mail
                #client
                SetLine "55 * * * * test -d /opt/cfengine/bin ||
/var/cfengine/bin/cfagent"
                AppendIfNoLineMatching "^.*cfagent.*$"
                ReplaceLinesMatchingField 10
                
                DefineClasses "reload_root_crontab"
        }


After running, the above (which generates no error messages under -I or
-v)  appends these lines to the target file:

^.*cfsplay.*$
^.*cfagent.*$


Anybody else seeing this?

If it is of any relevance, this is running on a conf file that is being imported by another, and the "parent" file already has an editfiles: section. Don't see why that would matter, but it does seem to be a different approach than most of the examples out there I have seen.





reply via email to

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