Displaying 4 results from an estimated 4 matches for "is_seq".
Did you mean:
is_set
2015 Jul 01
0
[PATCH 3/3] sysprep: rework and fix cron-spool operation (RHBZ#1229305)
...sysprep/sysprep_operation_cron_spool.ml
@@ -18,19 +18,32 @@
open Sysprep_operation
open Common_gettext.Gettext
+open Common_utils
module G = Guestfs
let cron_spool_perform (g : Guestfs.guestfs) root side_effects =
- Array.iter g#rm_rf (g#glob_expand "/var/spool/cron/*");
+ let is_seq path =
+ let basename =
+ try last_part_of path '/'
+ with Not_found -> path in
+ basename = ".SEQ" in
+ let reset f =
+ if g#is_file f then
+ (* This should overwrite the file in-place, as it's a very
+ * small buffer which will be handled us...
2015 Jul 01
0
[PATCH 2/2] sysprep: rework and fix cron-spool operation (RHBZ#1229305)
...sysprep/sysprep_operation_cron_spool.ml
@@ -18,19 +18,33 @@
open Sysprep_operation
open Common_gettext.Gettext
+open Common_utils
module G = Guestfs
let cron_spool_perform (g : Guestfs.guestfs) root side_effects =
- Array.iter g#rm_rf (g#glob_expand "/var/spool/cron/*");
+ let is_seq path =
+ let basename =
+ match last_part_of path '/' with
+ | Some x -> x
+ | None -> path in
+ basename = ".SEQ" in
+ let reset f =
+ if g#is_file f then
+ (* This should overwrite the file in-place, as it's a very
+ * small buffer w...
2015 Jul 01
4
[PATCH 1/2] mllib: add and use last_part_of
Collect this small snippet to get the part of a string after the last
occurrency of a character; replace with it the current snippets doing
the same.
Should be just code motion.
---
customize/password.ml | 5 +++--
mllib/common_utils.ml | 7 +++++++
mllib/common_utils.mli | 3 +++
sysprep/sysprep_operation_user_account.ml | 5 +++--
2015 Jul 01
5
[PATCH 1/3] mllib: add an optional filter for rm_rf_only_files
This way it is possible to use rm_rf_only_files, but not removing
specific files.
---
mllib/common_utils.ml | 8 +++++++-
mllib/common_utils.mli | 5 ++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml
index 516cff3..3737b4c 100644
--- a/mllib/common_utils.ml
+++ b/mllib/common_utils.ml
@@ -640,13 +640,19 @@ let rmdir_on_exit =
*