Package: cfengine2
Version: 2.1.20-1
Severity: normal

I have a /etc/bacula/bacula-fd.conf file that contains, amoung other 
things, this:

Director {
  Name = backup-dir
  Password = "foo"
}

Director {
  Name = backup-mon
  Password = "bar"
  Monitor = yes
}

I am trying to delete just the second section.  
I tried this:

       BeginGroupIfLineMatching "  name = .+-mon"
         IncrementPointer "-1"
         DeleteToLineMatching "\}"
         DeleteNLines "1"
       EndGroup

But it never deletes the leading "Director {" line.  Examining it under -v 
reveals that the IncrementPointer call doesn't seem to be getting run at all
(other IncrementPointer calls in the same file edit do cause the pointer
to be modified).

When used outside of a group, IncrementPointer looks fine.

The documentation neither mentions this limitation nor offers a workaround.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.22
Locale: LANG=C, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages cfengine2 depends on:
ii  debconf [debconf-2.0]        1.5.2       Debian configuration management sy
ii  debianutils                  2.16.1      Miscellaneous utilities specific t
ii  libc6                        2.3.6-15    GNU C Library: Shared libraries
ii  libdb4.2                     4.2.52-23.1 Berkeley v4.2 Database Libraries [
ii  libssl0.9.8                  0.9.8b-2    SSL shared libraries
ii  perl                         5.8.8-4     Larry Wall's Practical Extraction 

cfengine2 recommends no packages.

-- debconf information excluded


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to