summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/media.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>2000-09-25 20:19:43 +0000
committerjkh <jkh@FreeBSD.org>2000-09-25 20:19:43 +0000
commit03870bb44ff4b30367f7ebf9f87c568280bf19ba (patch)
tree3860bb1a2c0b30fadbf5a82b27762e233237b5cc /usr.sbin/sysinstall/media.c
parent4892f3a914467b489d8c5f640d5f6120a0783be1 (diff)
downloadFreeBSD-src-03870bb44ff4b30367f7ebf9f87c568280bf19ba.zip
FreeBSD-src-03870bb44ff4b30367f7ebf9f87c568280bf19ba.tar.gz
Fix the http proxy fetch code.
Submitted by: Philipp Mergenthaler <p@i609.hadiko.de> PR: 21449
Diffstat (limited to 'usr.sbin/sysinstall/media.c')
-rw-r--r--usr.sbin/sysinstall/media.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c
index 305fb79..91996e1 100644
--- a/usr.sbin/sysinstall/media.c
+++ b/usr.sbin/sysinstall/media.c
@@ -50,6 +50,7 @@
#include <resolv.h>
static Boolean got_intr = FALSE;
+static Boolean ftp_skip_resolve = FALSE;
/* timeout handler */
static void
@@ -392,7 +393,7 @@ mediaSetFTP(dialogMenuItem *self)
msgDebug("dir = `%s'\n", dir ? dir : "/");
msgDebug("port # = `%d'\n", FtpPort);
}
- if (variable_get(VAR_NAMESERVER)) {
+ if (!ftp_skip_resolve && variable_get(VAR_NAMESERVER)) {
msgNotify("Looking up host %s.", hostname);
if (isDebug())
msgDebug("Starting DNS.\n");
@@ -452,22 +453,22 @@ mediaSetFTPPassive(dialogMenuItem *self)
int mediaSetHTTP(dialogMenuItem *self)
{
+ Boolean tmp;
int result;
- char *cp, *idx, hbuf[MAXHOSTNAMELEN], *hostname, *var_hostname;
+ char *cp, *idx, hbuf[MAXHOSTNAMELEN], *hostname;
int HttpPort;
int what = DITEM_RESTORE;
- var_hostname = variable_get(VAR_NAMESERVER);
- variable_unset(VAR_NAMESERVER);
+ tmp = ftp_skip_resolve;
+ ftp_skip_resolve = TRUE;
result = mediaSetFTP(self);
- if (var_hostname)
- variable_set2(VAR_NAMESERVER, var_hostname, 0);
+ ftp_skip_resolve = tmp;
if (DITEM_STATUS(result) != DITEM_SUCCESS)
return result;
- cp = variable_get_value(VAR_HTTP_PATH,
+ cp = variable_get_value(VAR_HTTP_PROXY,
"Please enter the address of the HTTP proxy in this format:\n"
" hostname:port (the ':port' is optional, default is 3128)",0);
if (!cp)
OpenPOWER on IntegriCloud