Also use the Common_utils.make_message_function function to print
messages (same as virt-builder).
---
sysprep/main.ml | 12 ++++++------
sysprep/sysprep_operation.ml | 20 +++++++++++---------
sysprep/sysprep_operation.mli | 8 ++++----
sysprep/sysprep_operation_abrt_data.ml | 2 +-
sysprep/sysprep_operation_bash_history.ml | 2 +-
sysprep/sysprep_operation_blkid_tab.ml | 2 +-
sysprep/sysprep_operation_ca_certificates.ml | 2 +-
sysprep/sysprep_operation_crash_data.ml | 2 +-
sysprep/sysprep_operation_cron_spool.ml | 2 +-
sysprep/sysprep_operation_dhcp_client_state.ml | 2 +-
sysprep/sysprep_operation_dhcp_server_state.ml | 2 +-
sysprep/sysprep_operation_dovecot_data.ml | 2 +-
sysprep/sysprep_operation_firewall_rules.ml | 2 +-
sysprep/sysprep_operation_flag_reconfiguration.ml | 2 +-
sysprep/sysprep_operation_fs_uuids.ml | 2 +-
sysprep/sysprep_operation_kerberos_data.ml | 2 +-
sysprep/sysprep_operation_logfiles.ml | 2 +-
sysprep/sysprep_operation_lvm_uuids.ml | 2 +-
sysprep/sysprep_operation_machine_id.ml | 2 +-
sysprep/sysprep_operation_mail_spool.ml | 2 +-
sysprep/sysprep_operation_net_hostname.ml | 2 +-
sysprep/sysprep_operation_net_hwaddr.ml | 2 +-
sysprep/sysprep_operation_pacct_log.ml | 2 +-
sysprep/sysprep_operation_package_manager_cache.ml | 2 +-
sysprep/sysprep_operation_pam_data.ml | 2 +-
sysprep/sysprep_operation_puppet_data_log.ml | 2 +-
sysprep/sysprep_operation_rh_subscription_manager.ml | 2 +-
sysprep/sysprep_operation_rhn_systemid.ml | 2 +-
sysprep/sysprep_operation_rpm_db.ml | 2 +-
sysprep/sysprep_operation_samba_db_log.ml | 2 +-
sysprep/sysprep_operation_script.ml | 2 +-
sysprep/sysprep_operation_smolt_uuid.ml | 2 +-
sysprep/sysprep_operation_ssh_hostkeys.ml | 2 +-
sysprep/sysprep_operation_ssh_userdir.ml | 2 +-
sysprep/sysprep_operation_sssd_db_log.ml | 2 +-
sysprep/sysprep_operation_tmp_files.ml | 2 +-
sysprep/sysprep_operation_udev_persistent_net.ml | 2 +-
sysprep/sysprep_operation_user_account.ml | 2 +-
sysprep/sysprep_operation_utmp.ml | 2 +-
sysprep/sysprep_operation_yum_uuid.ml | 2 +-
40 files changed, 58 insertions(+), 56 deletions(-)
diff --git a/sysprep/main.ml b/sysprep/main.ml
index 9047a74..def883c 100644
--- a/sysprep/main.ml
+++ b/sysprep/main.ml
@@ -33,7 +33,7 @@ let prog = Filename.basename Sys.executable_name
let () = Random.self_init ()
-let debug_gc, operations, g, autorelabel, quiet, mount_opts =
+let debug_gc, operations, g, autorelabel, quiet, mount_opts, verbose =
let debug_gc = ref false in
let domain = ref None in
let dryrun = ref false in
@@ -239,8 +239,8 @@ read the man page virt-sysprep(1).
let mount_opts mp =
try List.assoc mp mount_opts with Not_found -> "" in
- if not quiet then
- printf (f_"Examining the guest ...\n%!");
+ let msg fs = make_message_function ~quiet fs in
+ msg (f_"Examining the guest ...");
(* Connect to libguestfs. *)
let g = new G.guestfs () in
@@ -249,7 +249,7 @@ read the man page virt-sysprep(1).
add g dryrun;
g#launch ();
- debug_gc, operations, g, autorelabel, quiet, mount_opts
+ debug_gc, operations, g, autorelabel, quiet, mount_opts, verbose
let do_sysprep () =
(* Inspection. *)
@@ -279,7 +279,7 @@ let do_sysprep () =
(* Perform the filesystem operations. *)
Sysprep_operation.perform_operations_on_filesystems
- ?operations ~quiet g root side_effects;
+ ?operations ~debug:verbose ~quiet g root side_effects;
(* Check side-effects. *)
let created_files = side_effects#get_created_file in
@@ -307,7 +307,7 @@ let do_sysprep () =
(* Perform the block device operations. *)
Sysprep_operation.perform_operations_on_devices
- ?operations ~quiet g root side_effects;
+ ?operations ~debug:verbose ~quiet g root side_effects;
) roots
(* Finished. *)
diff --git a/sysprep/sysprep_operation.ml b/sysprep/sysprep_operation.ml
index f9cd021..4914a97 100644
--- a/sysprep/sysprep_operation.ml
+++ b/sysprep/sysprep_operation.ml
@@ -33,7 +33,7 @@ end
class device_side_effects = object end
-type 'a callback = Guestfs.guestfs -> string -> 'a -> unit
+type 'a callback = debug:bool -> quiet:bool -> Guestfs.guestfs -> string
-> 'a -> unit
type operation = {
order : int;
@@ -276,10 +276,12 @@ let compare_operations { order = o1; name = n1 } { order = o2; name
= n2 } =
let i = compare o1 o2 in
if i <> 0 then i else compare n1 n2
-let perform_operations_on_filesystems ?operations ?(quiet = false) g root
+let perform_operations_on_filesystems ?operations ~debug ~quiet g root
side_effects =
assert !baked;
+ let msg fs = make_message_function ~quiet fs in
+
let ops =
match operations with
| None -> !enabled_by_default_operations
@@ -292,16 +294,17 @@ let perform_operations_on_filesystems ?operations ?(quiet = false) g
root
List.iter (
function
| { name = name; perform_on_filesystems = Some fn } ->
- if not quiet then
- printf "Performing %S ...\n%!" name;
- fn g root side_effects
+ msg "Performing %S ..." name;
+ fn ~debug ~quiet g root side_effects
| { perform_on_filesystems = None } -> ()
) ops
-let perform_operations_on_devices ?operations ?(quiet = false) g root
+let perform_operations_on_devices ?operations ~debug ~quiet g root
side_effects =
assert !baked;
+ let msg fs = make_message_function ~quiet fs in
+
let ops =
match operations with
| None -> !enabled_by_default_operations
@@ -314,8 +317,7 @@ let perform_operations_on_devices ?operations ?(quiet = false) g root
List.iter (
function
| { name = name; perform_on_devices = Some fn } ->
- if not quiet then
- printf "Performing %S ...\n%!" name;
- fn g root side_effects
+ msg "Performing %S ..." name;
+ fn ~debug ~quiet g root side_effects
| { perform_on_devices = None } -> ()
) ops
diff --git a/sysprep/sysprep_operation.mli b/sysprep/sysprep_operation.mli
index 89812d2..03859ae 100644
--- a/sysprep/sysprep_operation.mli
+++ b/sysprep/sysprep_operation.mli
@@ -30,8 +30,8 @@ end
class device_side_effects : object end
(** There are currently no device side-effects. For future use. *)
-type 'side_effects callback = Guestfs.guestfs -> string -> 'side_effects
-> unit
-(** [callback g root side_effects] is called to do work.
+type 'side_effects callback = debug:bool -> quiet:bool -> Guestfs.guestfs ->
string -> 'side_effects -> unit
+(** [callback ~debug ~quiet g root side_effects] is called to do work.
If the operation has side effects such as creating files, it
should indicate that by calling the [side_effects] object. *)
@@ -169,8 +169,8 @@ val remove_all_from_set : set -> set
(** [remove_all_from_set set] removes from [set] all the available
operations. *)
-val perform_operations_on_filesystems : ?operations:set -> ?quiet:bool ->
Guestfs.guestfs -> string -> filesystem_side_effects -> unit
+val perform_operations_on_filesystems : ?operations:set -> debug:bool -> quiet:bool
-> Guestfs.guestfs -> string -> filesystem_side_effects -> unit
(** Perform all operations, or the subset listed in the [operations] set. *)
-val perform_operations_on_devices : ?operations:set -> ?quiet:bool ->
Guestfs.guestfs -> string -> device_side_effects -> unit
+val perform_operations_on_devices : ?operations:set -> debug:bool -> quiet:bool
-> Guestfs.guestfs -> string -> device_side_effects -> unit
(** Perform all operations, or the subset listed in the [operations] set. *)
diff --git a/sysprep/sysprep_operation_abrt_data.ml
b/sysprep/sysprep_operation_abrt_data.ml
index d950270..94d8dd7 100644
--- a/sysprep/sysprep_operation_abrt_data.ml
+++ b/sysprep/sysprep_operation_abrt_data.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let abrt_data_perform g root side_effects =
+let abrt_data_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let paths = g#glob_expand "/var/spool/abrt/*" in
diff --git a/sysprep/sysprep_operation_bash_history.ml
b/sysprep/sysprep_operation_bash_history.ml
index 67eb4e3..fdc0786 100644
--- a/sysprep/sysprep_operation_bash_history.ml
+++ b/sysprep/sysprep_operation_bash_history.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let bash_history_perform g root side_effects =
+let bash_history_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let files = g#glob_expand "/home/*/.bash_history" in
diff --git a/sysprep/sysprep_operation_blkid_tab.ml
b/sysprep/sysprep_operation_blkid_tab.ml
index 9c239b7..f85e987 100644
--- a/sysprep/sysprep_operation_blkid_tab.ml
+++ b/sysprep/sysprep_operation_blkid_tab.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let blkid_tab_perform g root side_effects =
+let blkid_tab_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let files = [ "/var/run/blkid.tab";
diff --git a/sysprep/sysprep_operation_ca_certificates.ml
b/sysprep/sysprep_operation_ca_certificates.ml
index 213f4ac..c846b25 100644
--- a/sysprep/sysprep_operation_ca_certificates.ml
+++ b/sysprep/sysprep_operation_ca_certificates.ml
@@ -22,7 +22,7 @@ open Common_gettext.Gettext
module StringSet = Set.Make (String)
module G = Guestfs
-let ca_certificates_perform g root side_effects =
+let ca_certificates_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let paths = [ "/etc/pki/CA/certs/*.crt";
diff --git a/sysprep/sysprep_operation_crash_data.ml
b/sysprep/sysprep_operation_crash_data.ml
index 79f3d7f..3fb865e 100644
--- a/sysprep/sysprep_operation_crash_data.ml
+++ b/sysprep/sysprep_operation_crash_data.ml
@@ -26,7 +26,7 @@ let globs = [
"/var/log/dump/*";
]
-let crash_data_perform g root side_effects =
+let crash_data_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ = "linux" then (
List.iter (fun glob -> Array.iter g#rm_rf (g#glob_expand glob)) globs
diff --git a/sysprep/sysprep_operation_cron_spool.ml
b/sysprep/sysprep_operation_cron_spool.ml
index 687a7e9..0f11f91 100644
--- a/sysprep/sysprep_operation_cron_spool.ml
+++ b/sysprep/sysprep_operation_cron_spool.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let cron_spool_perform (g : Guestfs.guestfs) root side_effects =
+let cron_spool_perform ~debug ~quiet (g : Guestfs.guestfs) root side_effects =
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");
diff --git a/sysprep/sysprep_operation_dhcp_client_state.ml
b/sysprep/sysprep_operation_dhcp_client_state.ml
index 3ee91df..803c3ce 100644
--- a/sysprep/sysprep_operation_dhcp_client_state.ml
+++ b/sysprep/sysprep_operation_dhcp_client_state.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let dhcp_client_state_perform g root side_effects =
+let dhcp_client_state_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ = "linux" then (
List.iter (
diff --git a/sysprep/sysprep_operation_dhcp_server_state.ml
b/sysprep/sysprep_operation_dhcp_server_state.ml
index dfc71b2..3bf13d3 100644
--- a/sysprep/sysprep_operation_dhcp_server_state.ml
+++ b/sysprep/sysprep_operation_dhcp_server_state.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let dhcp_server_state_perform g root side_effects =
+let dhcp_server_state_perform ~debug ~quiet g root side_effects =
Array.iter g#rm_rf (g#glob_expand "/var/lib/dhcpd/*")
let op = {
diff --git a/sysprep/sysprep_operation_dovecot_data.ml
b/sysprep/sysprep_operation_dovecot_data.ml
index 976d483..e9d6dc5 100644
--- a/sysprep/sysprep_operation_dovecot_data.ml
+++ b/sysprep/sysprep_operation_dovecot_data.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let dovecot_data_perform g root side_effects =
+let dovecot_data_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let files = g#glob_expand "/var/lib/dovecot/*" in
diff --git a/sysprep/sysprep_operation_firewall_rules.ml
b/sysprep/sysprep_operation_firewall_rules.ml
index f5967fc..558aca3 100644
--- a/sysprep/sysprep_operation_firewall_rules.ml
+++ b/sysprep/sysprep_operation_firewall_rules.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let firewall_rules_perform g root side_effects =
+let firewall_rules_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let paths = [ "/etc/sysconfig/iptables";
diff --git a/sysprep/sysprep_operation_flag_reconfiguration.ml
b/sysprep/sysprep_operation_flag_reconfiguration.ml
index e4df324..69ea377 100644
--- a/sysprep/sysprep_operation_flag_reconfiguration.ml
+++ b/sysprep/sysprep_operation_flag_reconfiguration.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let flag_reconfiguration g root side_effects =
+let flag_reconfiguration ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
g#touch "/.unconfigured";
diff --git a/sysprep/sysprep_operation_fs_uuids.ml
b/sysprep/sysprep_operation_fs_uuids.ml
index b91c9d7..32ee67d 100644
--- a/sysprep/sysprep_operation_fs_uuids.ml
+++ b/sysprep/sysprep_operation_fs_uuids.ml
@@ -23,7 +23,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let rec fs_uuids_perform g root side_effects =
+let rec fs_uuids_perform ~debug ~quiet g root side_effects =
let fses = g#list_filesystems () in
List.iter (function
| _, "unknown" -> ()
diff --git a/sysprep/sysprep_operation_kerberos_data.ml
b/sysprep/sysprep_operation_kerberos_data.ml
index 449d604..1e7d436 100644
--- a/sysprep/sysprep_operation_kerberos_data.ml
+++ b/sysprep/sysprep_operation_kerberos_data.ml
@@ -22,7 +22,7 @@ open Common_gettext.Gettext
module StringSet = Set.Make (String)
module G = Guestfs
-let kerberos_data_perform g root side_effects =
+let kerberos_data_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let excepts = [ "/var/kerberos/krb5kdc/kadm5.acl";
diff --git a/sysprep/sysprep_operation_logfiles.ml
b/sysprep/sysprep_operation_logfiles.ml
index 4c3eb8c..cf525c2 100644
--- a/sysprep/sysprep_operation_logfiles.ml
+++ b/sysprep/sysprep_operation_logfiles.ml
@@ -104,7 +104,7 @@ let globs = List.sort compare [
]
let globs_as_pod = String.concat "\n" (List.map ((^) " ") globs)
-let logfiles_perform g root side_effects =
+let logfiles_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ = "linux" then (
List.iter (fun glob -> Array.iter g#rm_rf (g#glob_expand glob)) globs
diff --git a/sysprep/sysprep_operation_lvm_uuids.ml
b/sysprep/sysprep_operation_lvm_uuids.ml
index c67b214..85cd9ee 100644
--- a/sysprep/sysprep_operation_lvm_uuids.ml
+++ b/sysprep/sysprep_operation_lvm_uuids.ml
@@ -23,7 +23,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let rec lvm_uuids_perform g root side_effects =
+let rec lvm_uuids_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ = "linux" then (
let has_lvm2_feature =
diff --git a/sysprep/sysprep_operation_machine_id.ml
b/sysprep/sysprep_operation_machine_id.ml
index fbcc692..68770f8 100644
--- a/sysprep/sysprep_operation_machine_id.ml
+++ b/sysprep/sysprep_operation_machine_id.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let machine_id_perform g root side_effects =
+let machine_id_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let path = "/etc/machine-id" in
diff --git a/sysprep/sysprep_operation_mail_spool.ml
b/sysprep/sysprep_operation_mail_spool.ml
index 0db831c..8e59f33 100644
--- a/sysprep/sysprep_operation_mail_spool.ml
+++ b/sysprep/sysprep_operation_mail_spool.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let mail_spool_perform g root side_effects =
+let mail_spool_perform ~debug ~quiet g root side_effects =
List.iter (
fun glob -> Array.iter g#rm_rf (g#glob_expand glob)
) [
diff --git a/sysprep/sysprep_operation_net_hostname.ml
b/sysprep/sysprep_operation_net_hostname.ml
index bc99662..c0491ab 100644
--- a/sysprep/sysprep_operation_net_hostname.ml
+++ b/sysprep/sysprep_operation_net_hostname.ml
@@ -22,7 +22,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let net_hostname_perform g root side_effects =
+let net_hostname_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
let distro = g#inspect_get_distro root in
match typ, distro with
diff --git a/sysprep/sysprep_operation_net_hwaddr.ml
b/sysprep/sysprep_operation_net_hwaddr.ml
index fbf0a33..da3c2b3 100644
--- a/sysprep/sysprep_operation_net_hwaddr.ml
+++ b/sysprep/sysprep_operation_net_hwaddr.ml
@@ -22,7 +22,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let net_hwaddr_perform g root side_effects =
+let net_hwaddr_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
let distro = g#inspect_get_distro root in
match typ, distro with
diff --git a/sysprep/sysprep_operation_pacct_log.ml
b/sysprep/sysprep_operation_pacct_log.ml
index 355198d..41a6cad 100644
--- a/sysprep/sysprep_operation_pacct_log.ml
+++ b/sysprep/sysprep_operation_pacct_log.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let pacct_log_perform g root side_effects =
+let pacct_log_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
let distro = g#inspect_get_distro root in
match typ, distro with
diff --git a/sysprep/sysprep_operation_package_manager_cache.ml
b/sysprep/sysprep_operation_package_manager_cache.ml
index 18d65e8..0c86eca 100644
--- a/sysprep/sysprep_operation_package_manager_cache.ml
+++ b/sysprep/sysprep_operation_package_manager_cache.ml
@@ -22,7 +22,7 @@ open Common_utils
module G = Guestfs
-let package_manager_cache_perform g root side_effects =
+let package_manager_cache_perform ~debug ~quiet g root side_effects =
let packager = g#inspect_get_package_management root in
let cache_dirs =
match packager with
diff --git a/sysprep/sysprep_operation_pam_data.ml
b/sysprep/sysprep_operation_pam_data.ml
index c3b988f..a8e93e3 100644
--- a/sysprep/sysprep_operation_pam_data.ml
+++ b/sysprep/sysprep_operation_pam_data.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let pam_data_perform g root side_effects =
+let pam_data_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let paths = [ "/var/run/console/*";
diff --git a/sysprep/sysprep_operation_puppet_data_log.ml
b/sysprep/sysprep_operation_puppet_data_log.ml
index f00e4a9..af1d8ba 100644
--- a/sysprep/sysprep_operation_puppet_data_log.ml
+++ b/sysprep/sysprep_operation_puppet_data_log.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let puppet_data_log_perform g root side_effects =
+let puppet_data_log_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let paths = [ "/var/log/puppet/*";
diff --git a/sysprep/sysprep_operation_rh_subscription_manager.ml
b/sysprep/sysprep_operation_rh_subscription_manager.ml
index d6c38b2..1cf8a9b 100644
--- a/sysprep/sysprep_operation_rh_subscription_manager.ml
+++ b/sysprep/sysprep_operation_rh_subscription_manager.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let rh_subscription_manager_perform g root side_effects =
+let rh_subscription_manager_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
let distro = g#inspect_get_distro root in
diff --git a/sysprep/sysprep_operation_rhn_systemid.ml
b/sysprep/sysprep_operation_rhn_systemid.ml
index 21aace5..59a80b1 100644
--- a/sysprep/sysprep_operation_rhn_systemid.ml
+++ b/sysprep/sysprep_operation_rhn_systemid.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let rhn_systemid_perform g root side_effects =
+let rhn_systemid_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
let distro = g#inspect_get_distro root in
diff --git a/sysprep/sysprep_operation_rpm_db.ml b/sysprep/sysprep_operation_rpm_db.ml
index 55e50fe..8f5e63b 100644
--- a/sysprep/sysprep_operation_rpm_db.ml
+++ b/sysprep/sysprep_operation_rpm_db.ml
@@ -22,7 +22,7 @@ open Common_gettext.Gettext
module StringSet = Set.Make (String)
module G = Guestfs
-let rpm_db_perform g root side_effects =
+let rpm_db_perform ~debug ~quiet g root side_effects =
let pf = g#inspect_get_package_format root in
if pf = "rpm" then (
let paths = g#glob_expand "/var/lib/rpm/__db.*" in
diff --git a/sysprep/sysprep_operation_samba_db_log.ml
b/sysprep/sysprep_operation_samba_db_log.ml
index 126a7ac..a8dd0d3 100644
--- a/sysprep/sysprep_operation_samba_db_log.ml
+++ b/sysprep/sysprep_operation_samba_db_log.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let samba_db_log_perform g root side_effects =
+let samba_db_log_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let paths = [ "/var/log/samba/old/*";
diff --git a/sysprep/sysprep_operation_script.ml b/sysprep/sysprep_operation_script.ml
index 614910f..b9641e7 100644
--- a/sysprep/sysprep_operation_script.ml
+++ b/sysprep/sysprep_operation_script.ml
@@ -36,7 +36,7 @@ let set_scriptdir dir =
let scripts = ref []
let add_script script = scripts := script :: !scripts
-let rec script_perform (g : Guestfs.guestfs) root side_effects =
+let rec script_perform ~debug ~quiet (g : Guestfs.guestfs) root side_effects =
let scripts = List.rev !scripts in
if scripts <> [] then (
(* Create a temporary directory? *)
diff --git a/sysprep/sysprep_operation_smolt_uuid.ml
b/sysprep/sysprep_operation_smolt_uuid.ml
index dd80c1d..55b9447 100644
--- a/sysprep/sysprep_operation_smolt_uuid.ml
+++ b/sysprep/sysprep_operation_smolt_uuid.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let smolt_uuid_perform g root side_effects =
+let smolt_uuid_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ = "linux" then (
let files = [ "/etc/sysconfig/hw-uuid";
diff --git a/sysprep/sysprep_operation_ssh_hostkeys.ml
b/sysprep/sysprep_operation_ssh_hostkeys.ml
index 417e792..1f31051 100644
--- a/sysprep/sysprep_operation_ssh_hostkeys.ml
+++ b/sysprep/sysprep_operation_ssh_hostkeys.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let ssh_hostkeys_perform g root side_effects =
+let ssh_hostkeys_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let files = g#glob_expand "/etc/ssh/*_host_*" in
diff --git a/sysprep/sysprep_operation_ssh_userdir.ml
b/sysprep/sysprep_operation_ssh_userdir.ml
index 19f8890..3b6d553 100644
--- a/sysprep/sysprep_operation_ssh_userdir.ml
+++ b/sysprep/sysprep_operation_ssh_userdir.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let ssh_userdir_perform g root side_effects =
+let ssh_userdir_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let dirs = g#glob_expand "/home/*/.ssh" in
diff --git a/sysprep/sysprep_operation_sssd_db_log.ml
b/sysprep/sysprep_operation_sssd_db_log.ml
index 8f1bc88..644c105 100644
--- a/sysprep/sysprep_operation_sssd_db_log.ml
+++ b/sysprep/sysprep_operation_sssd_db_log.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let sssd_db_log_perform g root side_effects =
+let sssd_db_log_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let paths = [ "/var/log/sssd/*";
diff --git a/sysprep/sysprep_operation_tmp_files.ml
b/sysprep/sysprep_operation_tmp_files.ml
index 72de200..dc0247e 100644
--- a/sysprep/sysprep_operation_tmp_files.ml
+++ b/sysprep/sysprep_operation_tmp_files.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let tmp_files_perform g root side_effects =
+let tmp_files_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
let paths = [ "/tmp/*";
diff --git a/sysprep/sysprep_operation_udev_persistent_net.ml
b/sysprep/sysprep_operation_udev_persistent_net.ml
index d0ddd53..764f8a3 100644
--- a/sysprep/sysprep_operation_udev_persistent_net.ml
+++ b/sysprep/sysprep_operation_udev_persistent_net.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let udev_persistent_net_perform g root side_effects =
+let udev_persistent_net_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ = "linux" then (
try g#rm "/etc/udev/rules.d/70-persistent-net.rules"
diff --git a/sysprep/sysprep_operation_user_account.ml
b/sysprep/sysprep_operation_user_account.ml
index b5a6e71..14b3b44 100644
--- a/sysprep/sysprep_operation_user_account.ml
+++ b/sysprep/sysprep_operation_user_account.ml
@@ -25,7 +25,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let user_account_perform g root side_effects =
+let user_account_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
g#aug_init "/" 0;
diff --git a/sysprep/sysprep_operation_utmp.ml b/sysprep/sysprep_operation_utmp.ml
index 3c9c6de..c559a03 100644
--- a/sysprep/sysprep_operation_utmp.ml
+++ b/sysprep/sysprep_operation_utmp.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let utmp_perform g root side_effects =
+let utmp_perform ~debug ~quiet g root side_effects =
let typ = g#inspect_get_type root in
if typ <> "windows" then (
try g#rm "/var/run/utmp"
diff --git a/sysprep/sysprep_operation_yum_uuid.ml
b/sysprep/sysprep_operation_yum_uuid.ml
index 045970c..c775d85 100644
--- a/sysprep/sysprep_operation_yum_uuid.ml
+++ b/sysprep/sysprep_operation_yum_uuid.ml
@@ -21,7 +21,7 @@ open Common_gettext.Gettext
module G = Guestfs
-let yum_uuid_perform g root side_effects =
+let yum_uuid_perform ~debug ~quiet g root side_effects =
let packager = g#inspect_get_package_management root in
if packager = "yum" then (
try g#rm "/var/lib/yum/uuid" with G.Error _ -> ()
--
1.8.5.3