diff --git a/image_creator/os_type/unix.py b/image_creator/os_type/unix.py index e5e5a87f43779a9029120e294949c2bd045b85a1..b7cde5d74cfbbfe7830d26b96a8a983037a79f22 100644 --- a/image_creator/os_type/unix.py +++ b/image_creator/os_type/unix.py @@ -36,13 +36,19 @@ class Unix(OSBase): self.cleanup_userdata() self.cleanup_tmp() self.cleanup_log() + self.cleanup_mail() def cleanup_tmp(self): self.foreach_file('/tmp', self.g.rm_rf, maxdepth=1) + self.foreach_file('/var/tmp', self.g.rm_rf, maxdepth=1) def cleanup_log(self): self.foreach_file('/var/log', self.g.truncate, ftype='r') + def cleanup_mail(self): + self.foreach_file('var/spool/mail', self.g.rm_rf, maxdepth=1) + self.foreach_file('var/mail', self.g.rm_rf, maxdepth=1) + def cleanup_userdata(self): homedirs = ['/root'] + self.ls('/home/')