diff --git a/builder/cmdline.ml b/builder/cmdline.ml index 7b119d5ce..ec189ad8d 100644 --- a/builder/cmdline.ml +++ b/builder/cmdline.ml @@ -312,7 +312,8 @@ read the man page virt-builder(1). | `Password _ | `RootPassword _ | `Scrub _ | `SSHInject _ | `Timezone _ | `Truncate _ | `TruncateRecursive _ | `Upload _ | `Write _ | `Chmod _ - | `CommandsFromFile _ | `CopyIn _ | `Copy _ | `Move _ -> false + | `CommandsFromFile _ | `CopyIn _ | `Copy _ | `Move _ + | `Touch _ -> false ) ops.ops in if requires_execute_on_guest then error (f_"sorry, cannot run commands on a guest with a different architecture"); diff --git a/customize/customize_run.ml b/customize/customize_run.ml index f2dbaa2f5..08cff0ba3 100644 --- a/customize/customize_run.ml +++ b/customize/customize_run.ml @@ -268,6 +268,10 @@ exec >>%s 2>&1 if not (Timezone.set_timezone g root tz) then warning (f_"timezone could not be set for this type of guest") + | `Touch path -> + msg (f_"Running touch: %s") path; + g#touch path + | `Update -> msg (f_"Updating core packages"); let cmd = guest_update_command () in diff --git a/generator/customize.ml b/generator/customize.ml index 99ff4b944..2980d3966 100644 --- a/generator/customize.ml +++ b/generator/customize.ml @@ -363,6 +363,14 @@ Set the default timezone of the guest to C. Use a location string like C"; }; + { op_name = "touch"; + op_type = String "FILE"; + op_discrim = "`Touch"; + op_shortdesc = "Run touch on a file"; + op_pod_longdesc = "\ +This command performs a L-like operation on C."; + }; + { op_name = "update"; op_type = Unit; op_discrim = "`Update";