summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2012-09-21 21:04:43 +0200
committerRichard W.M. Jones <rjones@redhat.com>2012-09-22 12:58:13 +0100
commit1949016e899b2737525fdc9b6dda451ad9ecbd66 (patch)
treec76c3f2b61439e2fdc4fbf5f143b8646f5f2990a
parent55fef0e4e607b1d447a0a0804acd69481f7613e4 (diff)
downloadlibguestfs-1949016e899b2737525fdc9b6dda451ad9ecbd66.tar.gz
libguestfs-1949016e899b2737525fdc9b6dda451ad9ecbd66.tar.xz
libguestfs-1949016e899b2737525fdc9b6dda451ad9ecbd66.zip
sysprep: handle at jobs in cron-spool operation
cron-spool claims to remove at jobs, but it has no code to actually do that. Add patterns to remove files in known at spool locations. Signed-off-by: Olaf Hering <olaf@aepfle.de>
-rw-r--r--sysprep/sysprep_operation_cron_spool.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysprep/sysprep_operation_cron_spool.ml b/sysprep/sysprep_operation_cron_spool.ml
index 5284660a..e96832c9 100644
--- a/sysprep/sysprep_operation_cron_spool.ml
+++ b/sysprep/sysprep_operation_cron_spool.ml
@@ -23,6 +23,12 @@ module G = Guestfs
let cron_spool_perform g root =
Array.iter g#rm_rf (g#glob_expand "/var/spool/cron/*");
+ Array.iter g#rm (g#glob_expand "/var/spool/atjobs/*");
+ Array.iter g#rm (g#glob_expand "/var/spool/atjobs/.SEQ");
+ Array.iter g#rm (g#glob_expand "/var/spool/atspool/*");
+ Array.iter g#rm (g#glob_expand "/var/spool/at/*");
+ Array.iter g#rm (g#glob_expand "/var/spool/at/.SEQ");
+ Array.iter g#rm (g#glob_expand "/var/spool/at/spool/*");
[]
let cron_spool_op = {