Thanks a lot! it works fine!
As in rsyslog logrotate conf file there are many rules, I used this
syntax to retrieve the correct rule instead to define rule index manually:
augtool> print /files/etc/logrotate.d/rsyslog/rule[file =~
regexp("/var/log/mail.*")]/file[. =~ regexp("/var/log/mail.*")]
On 08/05/2012 10:39, Dominic Cleal wrote:
On 08/05/12 09:26, Luke Bigum wrote:
Theoretically you should be able to do this:
augtool> print /files/etc/logrotate.d/syslog/rule/file[. =~
regexp("/var/log/mail")]
... but I can't get the Regular Expression function to work in augtool :-(
Very nearly. Try this:
augtool> print /files/etc/logrotate.d/syslog/rule/file[. =~
regexp("/var/log/mail.*")]
/files/etc/logrotate.d/syslog/rule/file[3] = "/var/log/maillog"
The regexps are anchored by default, so you need the .* to match
anything after "mail".
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.