summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-03-07 13:08:03 +0000
committerOlivier Blin <oblin@mandriva.org>2005-03-07 13:08:03 +0000
commite1a365372367872f3ba9921cbd72d2388a4561e3 (patch)
treef0ff5512b7bc77807c8be9490d30af8894506ae2
parentf29b4388e4414e122491b6d330f332062b6fc53a (diff)
downloaddrakx-e1a365372367872f3ba9921cbd72d2388a4561e3.tar
drakx-e1a365372367872f3ba9921cbd72d2388a4561e3.tar.gz
drakx-e1a365372367872f3ba9921cbd72d2388a4561e3.tar.bz2
drakx-e1a365372367872f3ba9921cbd72d2388a4561e3.tar.xz
drakx-e1a365372367872f3ba9921cbd72d2388a4561e3.zip
ask if the http proxy should be used for ftp (#13492)
-rw-r--r--mdk-stage1/network.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c
index 394986c84..9683264ec 100644
--- a/mdk-stage1/network.c
+++ b/mdk-stage1/network.c
@@ -903,6 +903,7 @@ enum return_type ftp_prepare(void)
enum return_type results;
struct utsname kernel_uname;
char *http_proxy_host, *http_proxy_port;
+ int use_http_proxy;
if (!ramdisk_possible()) {
stg1_error_message("FTP install needs more than %d Mbytes of memory (detected %d Mbytes). You may want to try an NFS install.",
@@ -915,14 +916,15 @@ enum return_type ftp_prepare(void)
if (results != RETURN_OK)
return results;
- get_http_proxy(&http_proxy_host, &http_proxy_port);
+ get_http_proxy(&http_proxy_host, &http_proxy_port);
+ use_http_proxy = http_proxy_host && http_proxy_port && !streq(http_proxy_host, "") && !streq(http_proxy_port, "");
+
uname(&kernel_uname);
do {
char location_full[500];
int ftp_serv_response = -1;
int fd, size;
- int use_http_proxy;
char ftp_hostname[500];
if (!IS_AUTOMATIC) {
@@ -933,6 +935,15 @@ enum return_type ftp_prepare(void)
if (results == RETURN_BACK)
return ftp_prepare();
+
+ if (use_http_proxy) {
+ results = ask_yes_no("Do you want to use this HTTP proxy for FTP connections too ?");
+
+ if (results == RETURN_BACK)
+ return ftp_prepare();
+
+ use_http_proxy = results == RETURN_OK;
+ }
}
results = ask_from_entries_auto("Please enter the name or IP address of the FTP server, "
@@ -944,8 +955,6 @@ enum return_type ftp_prepare(void)
return ftp_prepare();
}
- use_http_proxy = http_proxy_host && http_proxy_port && !streq(http_proxy_host, "") && !streq(http_proxy_port, "");
-
strcpy(location_full, answers[1][0] == '/' ? "" : "/");
strcat(location_full, answers[1]);