summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-04-01 19:59:32 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-04-01 19:59:32 +0100
commit6c88ae851f80e766a94576fcea7c701994de05cc (patch)
tree28b411c7d373cfdb9c48c52ee6d53f11b1ff7433
parent65e20e34dd7eecb234d75bfcb0c4b5aab7972583 (diff)
downloadlibguestfs-6c88ae851f80e766a94576fcea7c701994de05cc.tar.gz
libguestfs-6c88ae851f80e766a94576fcea7c701994de05cc.tar.xz
libguestfs-6c88ae851f80e766a94576fcea7c701994de05cc.zip
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.
-rw-r--r--sysprep/sysprep_operation_script.ml14
1 files 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<script> (a shell script or program) against the
guest. The script can be any program on the host. The script's
-current directory will be the guest's root directory.";
+current directory will be the guest's root directory.
+
+B<Note:> If the script is not on the $PATH, then you must give
+the full absolute path to the script.";
];
perform = script_perform;
}