[Libguestfs] [PATCH 5/5] builder: templates: pass empty proxy to d-i when not set

Pino Toscano ptoscano at redhat.com
Mon Jul 10 14:46:23 UTC 2017


When there is no proxy set, pass an empty string to the Debian
Installer.  This way, the installer will not ask for a proxy.
---
 builder/templates/make-template.ml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/builder/templates/make-template.ml b/builder/templates/make-template.ml
index 164e146..fe9a44f 100755
--- a/builder/templates/make-template.ml
+++ b/builder/templates/make-template.ml
@@ -726,7 +726,11 @@ and make_virt_install_command os arch ks tmpname tmpout tmpefivars location
   let proxy =
     let p = try Some (Sys.getenv "http_proxy") with Not_found -> None in
     match p with
-    | None -> ""
+    | None ->
+       (match os with
+       | Fedora _ | RHEL _ | CentOS _ | Ubuntu _ -> ""
+       | Debian _ -> "mirror/http/proxy="
+       )
     | Some p ->
        match os with
        | Fedora _ | RHEL _ | CentOS _ -> "proxy=" ^ p
-- 
2.9.4




More information about the Libguestfs mailing list