diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-07-06 02:03:47 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1996-07-06 02:03:47 +0000 |
| commit | da6bf17c111451a5d9e69986a0bfa986604893b0 (patch) | |
| tree | 61efd76c399f0685a6823f98f506a8589521954d /release | |
| parent | 337f555126649b7aee06ba3f1df5c131d95f1e84 (diff) | |
Notes
Diffstat (limited to 'release')
| -rw-r--r-- | release/sysinstall/ftp_strat.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/release/sysinstall/ftp_strat.c b/release/sysinstall/ftp_strat.c index f19f646e1a69..3815f196cbcb 100644 --- a/release/sysinstall/ftp_strat.c +++ b/release/sysinstall/ftp_strat.c @@ -4,7 +4,7 @@ * This is probably the last attempt in the `sysinstall' line, the next * generation being slated to essentially a complete rewrite. * - * $Id: ftp_strat.c,v 1.18 1996/06/16 21:57:30 jkh Exp $ + * $Id: ftp_strat.c,v 1.19 1996/06/17 21:48:26 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -128,19 +128,22 @@ mediaInitFTP(Device *dev) return FALSE; } + hostname = variable_get(VAR_FTP_HOST); + dir = variable_get(VAR_FTP_DIR); + if (!hostname || !dir) + msgFatal("Missing FTP host or directory specification - something's wrong!"); + user = variable_get(VAR_FTP_USER); if (!user || !*user) { snprintf(password, BUFSIZ, "installer@%s", variable_get(VAR_HOSTNAME)); login_name = "anonymous"; } - else { + else login_name = user; - strcpy(password, variable_get(VAR_FTP_PASS) ? variable_get(VAR_FTP_PASS) : login_name); - } - hostname = variable_get(VAR_FTP_HOST); - dir = variable_get(VAR_FTP_DIR); - if (!hostname || !dir) - msgFatal("Missing FTP host or directory specification - something's wrong!"); + if (variable_get(VAR_FTP_PASS)) + strcpy(password, variable_get(VAR_FTP_PASS)); + else + sprintf(password, "%s@%s", login_name, hostname); retries = 0; retry: msgNotify("Logging in as %s..", login_name); |
