In particular the 'EXTSR' storage backend expects to find 'pvcreate' on the path. Rather than just fixing this one instance and then seeing what else fails, this patch should prevent this class of error recurring.
Note that the only place we actually pass a custom environment to a subprocess is when installing the debian etch template.
Signed-off-by: David Scott <dave.scott@eu.citrix.com>
(* XXX: this is a work in progress *)
+let default_path = [ "/sbin"; "/usr/sbin"; "/bin"; "/usr/bin" ]
+
open Pervasiveext
type pidty =
let env = match env with
| Some e -> e
- | None -> [||]
+ | None -> [| "PATH=" ^ (String.concat ":" default_path) |]
in
Fecomms.write_raw_rpc sock (Fe.Setup {Fe.cmdargs=(cmd::args); env=(Array.to_list env); id_to_fd_map = id_to_fd_map});