projects
/
snf-image-creator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
feab499
)
Add cleanup_cache function in unix
author
Nikos Skalkotos
<skalkoto@grnet.gr>
Tue, 13 Mar 2012 10:23:48 +0000
(12:23 +0200)
committer
Nikos Skalkotos
<skalkoto@grnet.gr>
Tue, 13 Mar 2012 10:23:48 +0000
(12:23 +0200)
This function will remove regular files under /var/cache
image_creator/os_type/unix.py
patch
|
blob
|
history
diff --git
a/image_creator/os_type/unix.py
b/image_creator/os_type/unix.py
index
b7cde5d
..
23f9d3e
100644
(file)
--- 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)