diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-11-01 19:31:17 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-11-01 19:31:17 +0000 |
commit | 226457de3d56d810ff08687e3b16996be5f223b0 (patch) | |
tree | 5696762ec6418e47932426ecc1c8807662b3dcc1 /sysprep/sysprep_operation_cron_spool.ml | |
parent | dd9bbeb060b55f17f4e2a006601e1ac73bbdb9d9 (diff) | |
download | libguestfs-226457de3d56d810ff08687e3b16996be5f223b0.tar.gz libguestfs-226457de3d56d810ff08687e3b16996be5f223b0.tar.xz libguestfs-226457de3d56d810ff08687e3b16996be5f223b0.zip |
sysprep: Don't fail when trying to remove /var/spool/at/spool (directory).
This fixes commit 1949016e899b2737525fdc9b6dda451ad9ecbd66.
Diffstat (limited to 'sysprep/sysprep_operation_cron_spool.ml')
-rw-r--r-- | sysprep/sysprep_operation_cron_spool.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sysprep/sysprep_operation_cron_spool.ml b/sysprep/sysprep_operation_cron_spool.ml index e96832c9..c087887b 100644 --- a/sysprep/sysprep_operation_cron_spool.ml +++ b/sysprep/sysprep_operation_cron_spool.ml @@ -26,7 +26,9 @@ let cron_spool_perform g root = 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 + (fun path -> if not (g#is_dir path) then g#rm path) + (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/*"); [] |