PATH:
usr
/
share
/
augeas
/
lenses
/
dist
(* Logrotate module for Augeas *) (* Author: Raphael Pinson <raphink@gmail.com> *) (* Patches from: *) (* Sean Millichamp <sean@bruenor.org> *) (* *) (* Supported : *) (* - defaults *) (* - rules *) (* - (pre|post)rotate entries *) (* *) (* Todo : *) (* *) module Logrotate = autoload xfm let sep_spc = Sep.space let sep_val = del /[ \t]*=[ \t]*|[ \t]+/ " " let eol = Util.eol let num = Rx.relinteger let word = /[^,#= \n\t{}]+/ let filename = /\/[^,#= \n\t{}]+/ let size = num . /[kMG]?/ let indent = del Rx.opt_space "\t" (* define omments and empty lines *) let comment = Util.comment let empty = Util.empty (* Useful functions *) let list_item = [ sep_spc . key /[^\/+,# \n\t{}]+/ ] let select_to_eol (kw:string) (select:regexp) = [ label kw . store select ] let value_to_eol (kw:string) (value:regexp) = Build.key_value kw sep_val (store value) let flag_to_eol (kw:string) = Build.flag kw let list_to_eol (kw:string) = [ key kw . list_item+ ] (* Defaults *) let create = let mode = sep_spc . [ label "mode" . store num ] in let owner = sep_spc . [ label "owner" . store word ] in let group = sep_spc . [ label "group" . store word ] in [ key "create" . ( mode | mode . owner | mode . owner . group )? ] let su = let owner = sep_spc . [ label "owner" . store word ] in let group = sep_spc . [ label "group" . store word ] in [ key "su" . ( owner | owner . group )? ] let tabooext = [ key "tabooext" . ( sep_spc . store /\+/ )? . list_item+ ] let attrs = select_to_eol "schedule" /(daily|weekly|monthly|yearly)/ | value_to_eol "rotate" num | create | flag_to_eol "nocreate" | su | value_to_eol "include" word | select_to_eol "missingok" /(no)?missingok/ | select_to_eol "compress" /(no)?compress/ | select_to_eol "delaycompress" /(no)?delaycompress/ | select_to_eol "ifempty" /(not)?ifempty/ | select_to_eol "sharedscripts" /(no)?sharedscripts/ | value_to_eol "size" size | tabooext | value_to_eol "olddir" word | flag_to_eol "noolddir" | value_to_eol "mail" word | flag_to_eol "mailfirst" | flag_to_eol "maillast" | flag_to_eol "nomail" | value_to_eol "errors" word | value_to_eol "extension" word | select_to_eol "dateext" /(no)?dateext/ | value_to_eol "dateformat" word | value_to_eol "compresscmd" word | value_to_eol "uncompresscmd" word | value_to_eol "compressext" word | list_to_eol "compressoptions" | select_to_eol "copy" /(no)?copy/ | select_to_eol "copytruncate" /(no)?copytruncate/ | value_to_eol "maxage" num | value_to_eol "minsize" size | value_to_eol "maxsize" size | select_to_eol "shred" /(no)?shred/ | value_to_eol "shredcycles" num | value_to_eol "start" num (* Define hooks *) let hook_lines = let line_re = /.*/ - /[ \t]*endscript[ \t]*/ in store ( line_re . ("\n" . line_re)* )? . Util.del_str "\n" let hooks = let hook_names = /(pre|post)rotate|(first|last)action/ in [ key hook_names . eol . hook_lines? . del /[ \t]*endscript/ "\tendscript" ] (* Define rule *) let body = Build.block_newlines (indent . (attrs | hooks) . eol) Util.comment let rule = let filename_entry = [ label "file" . store filename ] in let filename_sep = del /[ \t\n]+/ " " in let filenames = Build.opt_list filename_entry filename_sep in [ label "rule" . Util.indent . filenames . body . eol ] let lns = ( comment | empty | (attrs . eol) | rule )* let filter = incl "/etc/logrotate.d/*" . incl "/etc/logrotate.conf" . Util.stdexcl let xfm = transform lns filter
[+]
..
[-] mailscanner.aug
[edit]
[-] access.aug
[edit]
[-] gshadow.aug
[edit]
[-] activemq_conf.aug
[edit]
[-] gtkbookmarks.aug
[edit]
[-] activemq_xml.aug
[edit]
[-] hostname.aug
[edit]
[-] afs_cellalias.aug
[edit]
[-] mcollective.aug
[edit]
[-] aliases.aug
[edit]
[-] mdadm_conf.aug
[edit]
[-] anacron.aug
[edit]
[-] memcached.aug
[edit]
[-] approx.aug
[edit]
[-] group.aug
[edit]
[-] phpvars.aug
[edit]
[-] apt_update_manager.aug
[edit]
[-] grub.aug
[edit]
[-] puppet.aug
[edit]
[-] aptcacherngsecurity.aug
[edit]
[-] mongodbserver.aug
[edit]
[-] aptconf.aug
[edit]
[-] host_conf.aug
[edit]
[-] aptpreferences.aug
[edit]
[-] hosts.aug
[edit]
[-] aptsources.aug
[edit]
[-] hosts_access.aug
[edit]
[-] authorized_keys.aug
[edit]
[-] htpasswd.aug
[edit]
[-] automaster.aug
[edit]
[-] jettyrealm.aug
[edit]
[-] automounter.aug
[edit]
[-] mke2fs.aug
[edit]
[-] avahi.aug
[edit]
[-] jaas.aug
[edit]
[-] backuppchosts.aug
[edit]
[-] modprobe.aug
[edit]
[-] bbhosts.aug
[edit]
[-] jmxaccess.aug
[edit]
[-] bootconf.aug
[edit]
[-] modules.aug
[edit]
[-] build.aug
[edit]
[-] jmxpassword.aug
[edit]
[-] cachefilesd.aug
[edit]
[-] modules_conf.aug
[edit]
[-] carbon.aug
[edit]
[-] json.aug
[edit]
[-] cgconfig.aug
[edit]
[-] nagiosobjects.aug
[edit]
[-] cgrules.aug
[edit]
[-] kdump.aug
[edit]
[-] channels.aug
[edit]
[-] monit.aug
[edit]
[-] chrony.aug
[edit]
[-] multipath.aug
[edit]
[-] clamav.aug
[edit]
[-] keepalived.aug
[edit]
[-] cobblermodules.aug
[edit]
[-] known_hosts.aug
[edit]
[-] cobblersettings.aug
[edit]
[-] koji.aug
[edit]
[-] collectd.aug
[edit]
[-] mysql.aug
[edit]
[-] cpanel.aug
[edit]
[-] nagioscfg.aug
[edit]
[-] cron.aug
[edit]
[-] krb5.aug
[edit]
[-] crypttab.aug
[edit]
[-] netmasks.aug
[edit]
[-] cups.aug
[edit]
[-] ldif.aug
[edit]
[-] cyrus_imapd.aug
[edit]
[-] networkmanager.aug
[edit]
[-] darkice.aug
[edit]
[-] networks.aug
[edit]
[-] debctrl.aug
[edit]
[-] nrpe.aug
[edit]
[-] desktop.aug
[edit]
[-] ldso.aug
[edit]
[-] device_map.aug
[edit]
[-] lightdm.aug
[edit]
[-] dhclient.aug
[edit]
[-] nginx.aug
[edit]
[-] dhcpd.aug
[edit]
[-] limits.aug
[edit]
[-] dhcpd_140.aug
[edit]
[-] login_defs.aug
[edit]
[-] dns_zone.aug
[edit]
[-] ntpd.aug
[edit]
[-] dnsmasq.aug
[edit]
[-] nsswitch.aug
[edit]
[-] dovecot.aug
[edit]
[-] ntp.aug
[edit]
[-] dpkg.aug
[edit]
[-] odbc.aug
[edit]
[-] dput.aug
[edit]
[-] openshift_http.aug
[edit]
[-] erlang.aug
[edit]
[-] openshift_config.aug
[edit]
[-] ethers.aug
[edit]
[-] pamconf.aug
[edit]
[-] exports.aug
[edit]
[-] logrotate.aug
[edit]
[-] fai_diskconfig.aug
[edit]
[-] openvpn.aug
[edit]
[-] fonts.aug
[edit]
[-] pagekite.aug
[edit]
[-] fstab.aug
[edit]
[-] pam.aug
[edit]
[-] fuse.aug
[edit]
[-] passwd.aug
[edit]
[-] gdm.aug
[edit]
[-] httpd.aug
[edit]
[-] postfix_access.aug
[edit]
[-] inetd.aug
[edit]
[-] pbuilder.aug
[edit]
[-] inifile.aug
[edit]
[-] pg_hba.aug
[edit]
[-] inittab.aug
[edit]
[-] pgbouncer.aug
[edit]
[-] inputrc.aug
[edit]
[-] logwatch.aug
[edit]
[-] interfaces.aug
[edit]
[-] lokkit.aug
[edit]
[-] iproute2.aug
[edit]
[-] mailscanner_rules.aug
[edit]
[-] iptables.aug
[edit]
[-] php.aug
[edit]
[-] iscsid.aug
[edit]
[-] lvm.aug
[edit]
[-] util.aug
[edit]
[-] openshift_quickstarts.aug
[edit]
[-] xinetd.aug
[edit]
[-] postfix_main.aug
[edit]
[-] xendconfsxp.aug
[edit]
[-] postfix_master.aug
[edit]
[-] vfstab.aug
[edit]
[-] postfix_sasl_smtpd.aug
[edit]
[-] vmware_config.aug
[edit]
[-] postfix_transport.aug
[edit]
[-] xml.aug
[edit]
[-] postfix_virtual.aug
[edit]
[-] xorg.aug
[edit]
[-] postgresql.aug
[edit]
[-] xymon.aug
[edit]
[-] properties.aug
[edit]
[-] xymon_alerting.aug
[edit]
[-] protocols.aug
[edit]
[-] yum.aug
[edit]
[-] puppet_auth.aug
[edit]
[-] puppetfile.aug
[edit]
[-] vsftpd.aug
[edit]
[-] puppetfileserver.aug
[edit]
[-] anaconda.aug
[edit]
[-] pylonspaste.aug
[edit]
[-] pythonpaste.aug
[edit]
[-] qpid.aug
[edit]
[-] quote.aug
[edit]
[-] rabbitmq.aug
[edit]
[-] redis.aug
[edit]
[-] webmin.aug
[edit]
[-] reprepro_uploaders.aug
[edit]
[-] resolv.aug
[edit]
[-] rhsm.aug
[edit]
[-] rmt.aug
[edit]
[-] rsyncd.aug
[edit]
[-] rsyslog.aug
[edit]
[-] rx.aug
[edit]
[-] samba.aug
[edit]
[-] schroot.aug
[edit]
[-] securetty.aug
[edit]
[-] sep.aug
[edit]
[-] services.aug
[edit]
[-] shadow.aug
[edit]
[-] shells.aug
[edit]
[-] shellvars.aug
[edit]
[-] shellvars_list.aug
[edit]
[-] simplelines.aug
[edit]
[-] simplevars.aug
[edit]
[-] sip_conf.aug
[edit]
[-] slapd.aug
[edit]
[-] slapd_140.aug
[edit]
[-] smbusers.aug
[edit]
[-] solaris_system.aug
[edit]
[-] soma.aug
[edit]
[-] spacevars.aug
[edit]
[-] splunk.aug
[edit]
[-] squid.aug
[edit]
[-] ssh.aug
[edit]
[-] sshd.aug
[edit]
[-] sshd_140.aug
[edit]
[-] sssd.aug
[edit]
[-] stunnel.aug
[edit]
[-] subversion.aug
[edit]
[-] sudoers.aug
[edit]
[-] sysconfig.aug
[edit]
[-] sysconfig_route.aug
[edit]
[-] sysctl.aug
[edit]
[-] syslog.aug
[edit]
[-] systemd.aug
[edit]
[-] thttpd.aug
[edit]
[-] tuned.aug
[edit]
[-] up2date.aug
[edit]
[-] updatedb.aug
[edit]
[-] wine.aug
[edit]