From: Nikos Skalkotos Date: Tue, 13 Mar 2012 10:23:48 +0000 (+0200) Subject: Add cleanup_cache function in unix X-Git-Tag: v0.1~136 X-Git-Url: https://code.grnet.gr/git/snf-image-creator/commitdiff_plain/c16922f7c1676fff006b360b60fc495e268031bf Add cleanup_cache function in unix This function will remove regular files under /var/cache --- 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)