help-cfengine
[Top][All Lists]
Advanced

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

ResetSearch broken in 2.0.8p1?


From: Jamie Wilkinson
Subject: ResetSearch broken in 2.0.8p1?
Date: Wed, 3 Dec 2003 12:49:56 +1100
User-agent: Mutt/1.5.4i

I've upgraded my RH9 machines to cfengine 2.0.8p1 a while ago, and
started noticing that a lot of my editfiles scripts that rely on
ResetSearch (specifically, 'ResetSearch 1' so that when I use
LocateLineMatching I am not relying on any set order of the
configuration file) have aborted the edit once the second search is
made.

It looks like every instance of ResetSearch isn't doing anything, for
example from a verbose dump of one of my edits:

Begin editing /etc/sysconfig/rhn/up2date
Edit: Search ended at line 88
Edit: (Found httpProxy=hoard:3128)
(Begin Group - skipping ^httpProxy=hoard:3128)
Edit: Search for ^enableProxy=.* failed. Current line still 88
LocateLineMatchingRegexp failed in /etc/sysconfig/rhn/up2date, aborting editing
End editing /etc/sysconfig/rhn/up2date

based on the following editfiles script:

        { /etc/sysconfig/rhn/up2date
            Backup 'off'

            LocateLineMatching '^httpProxy=.*'
            BeginGroupIfNoMatch '^httpProxy=${update_http_proxy}'
                ReplaceLineWith 'httpProxy=${update_http_proxy}'
            EndGroup
            ResetSearch 1

            LocateLineMatching '^enableProxy=.*'
            BeginGroupIfNoMatch '^enableProxy=1'
                ReplaceLineWith 'enableProxy=1'
            EndGroup
            ResetSearch 1

            LocateLineMatching '^useNoSSLForPackages=.*'
            BeginGroupIfNoMatch '^useNoSSLForPackages=1'
                ReplaceLineWith 'useNoSSLForPackages=1'
            EndGroup
        }

The file in question has the options in this order:

useNoSSLForPackages
enableProxy
httpProxy

I'd been using 2.0.4 for a while before I upgraded to 2.0.8p1.

Does 2.1.0 fix this or is this a new bug?

-- 
address@hidden                           http://spacepants.org/jaq.gpg




reply via email to

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