From c16922f7c1676fff006b360b60fc495e268031bf Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos <skalkoto@grnet.gr> Date: Tue, 13 Mar 2012 12:23:48 +0200 Subject: [PATCH] Add cleanup_cache function in unix This function will remove regular files under /var/cache --- image_creator/os_type/unix.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/image_creator/os_type/unix.py b/image_creator/os_type/unix.py index b7cde5d..23f9d3e 100644 --- a/image_creator/os_type/unix.py +++ b/image_creator/os_type/unix.py @@ -37,6 +37,10 @@ class Unix(OSBase): self.cleanup_tmp() self.cleanup_log() self.cleanup_mail() + self.cleanup_cache() + + def cleanup_cache(self): + self.foreach_file('/var/cache', self.g.rm, ftype='r') def cleanup_tmp(self): self.foreach_file('/tmp', self.g.rm_rf, maxdepth=1) -- GitLab