[Libguestfs] [PATCH 1/2] sysprep: remove the logfiles configured by logrotate

Wanlong Gao gaowanlong at cn.fujitsu.com
Fri Apr 27 06:18:52 UTC 2012


Remove the logfiles configured by /etc/logrotate.d/*.
Omit the logfile of "samba" and "sssd" which we removed
them separately .

Signed-off-by: Wanlong Gao <gaowanlong at cn.fujitsu.com>
---
 sysprep/sysprep_operation_logfiles.ml |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/sysprep/sysprep_operation_logfiles.ml b/sysprep/sysprep_operation_logfiles.ml
index 2ad3726..cf72803 100644
--- a/sysprep/sysprep_operation_logfiles.ml
+++ b/sysprep/sysprep_operation_logfiles.ml
@@ -38,6 +38,27 @@ let globs = List.sort compare [
   "/var/log/tallylog*";
   "/var/log/wtmp*";
 
+  (* logfiles configured by /etc/logrotate.d/* *)
+  "/var/log/BackupPC/LOG";
+  "/var/log/ceph/*.log";
+  "/var/log/chrony/*.log";
+  "/var/log/cups/*_log";
+  "/var/log/glusterfs/*glusterd.vol.log";
+  "/var/log/glusterfs/glusterfs.log";
+  "/var/log/httpd/*log";
+  "/var/log/jetty/jetty-console.log";
+  "/var/log/libvirt/libvirtd.log";
+  "/var/log/libvirt/lxc/*.log";
+  "/var/log/libvirt/qemu/*.log";
+  "/var/log/libvirt/uml/*.log";
+  "/var/named/data/named.run";
+  "/var/log/ppp/connect-errors";
+  "/var/account/pacct";
+  "/var/log/setroubleshoot/*.log";
+  "/var/log/squid/*.log";
+  (* And the status file of logrotate *)
+  "/var/lib/logrotate.status";
+
   (* yum installation files *)
   "/root/install.log";
   "/root/install.log.syslog";
-- 
1.7.10




More information about the Libguestfs mailing list