From 6c88ae851f80e766a94576fcea7c701994de05cc Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 1 Apr 2012 19:59:32 +0100 Subject: sysprep: script: Remove useless check that script is executable. This check will fail if the script is on the path. Also document that script must be on the path or else the full path to the script must be given. --- sysprep/sysprep_operation_script.ml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/sysprep/sysprep_operation_script.ml b/sysprep/sysprep_operation_script.ml index 14a00ebf..a6591759 100644 --- a/sysprep/sysprep_operation_script.ml +++ b/sysprep/sysprep_operation_script.ml @@ -33,14 +33,7 @@ let set_scriptdir dir = scriptdir := Some dir let scripts = ref [] -let add_script script = - (* Sanity check that the script is executable. *) - let statbuf = stat script in - if statbuf.st_perm land 0o555 = 0 then ( - eprintf "virt-sysprep: script: %s: script is not executable\n" script; - exit 1 - ); - scripts := script :: !scripts +let add_script script = scripts := script :: !scripts let rec script_perform (g : Guestfs.guestfs) root = let scripts = List.rev !scripts in @@ -132,7 +125,10 @@ will be created."; "\ Run the named C