diff options
author | jkh <jkh@FreeBSD.org> | 1996-10-02 02:02:18 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-10-02 02:02:18 +0000 |
commit | b19ed7e5c87dd66648a79bf26d67628ff3478259 (patch) | |
tree | f21627d4a0804358e133b0e361f507df7ac38c55 /release | |
parent | c5daba2dfdde4dcede28aefd521ce3e716d42a70 (diff) | |
download | FreeBSD-src-b19ed7e5c87dd66648a79bf26d67628ff3478259.zip FreeBSD-src-b19ed7e5c87dd66648a79bf26d67628ff3478259.tar.gz |
Don't annoyingly reconfigure the network when you don't have to.
Diffstat (limited to 'release')
-rw-r--r-- | release/sysinstall/ftp_strat.c | 12 | ||||
-rw-r--r-- | release/sysinstall/media.c | 23 |
2 files changed, 22 insertions, 13 deletions
diff --git a/release/sysinstall/ftp_strat.c b/release/sysinstall/ftp_strat.c index ac1eec0..f20337d 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.23 1996/10/02 00:41:39 jkh Exp $ + * $Id: ftp_strat.c,v 1.24 1996/10/02 01:30:34 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -72,7 +72,7 @@ mediaInitFTP(Device *dev) try: cp = variable_get(VAR_FTP_PATH); if (!cp) { - msgConfirm("You haven't specified an FTP server!"); + msgConfirm("You haven't specified an FTP server! Please visit\nthe Options editor and select a Media type."); return FALSE; } @@ -119,17 +119,17 @@ try: "FTP server. You may need to visit a different server for\n" "the release you're trying to fetch or go to the Options\n" "menu and to set the release name to explicitly match what's\n" - "available on %s.\n\n" + "available on %s (or set to \"none\").\n\n" "Would you like to select another FTP server?", rel, hostname)) { dialog_clear_norefresh(); variable_unset(VAR_FTP_PATH); if (!dmenuOpenSimple(&MenuMediaFTP, FALSE)) goto punt; - else { - cp = variable_get(VAR_FTP_PATH); + else goto try; - } } + else + goto punt; } else if (i == IO_ERROR) goto punt; diff --git a/release/sysinstall/media.c b/release/sysinstall/media.c index 580f3b4..33ac214 100644 --- a/release/sysinstall/media.c +++ b/release/sysinstall/media.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: media.c,v 1.55 1996/10/01 14:08:28 jkh Exp $ + * $Id: media.c,v 1.56 1996/10/02 00:41:40 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -259,6 +259,7 @@ mediaSetFTP(dialogMenuItem *self) static Device ftpDevice; char *cp, *hostname, *dir; extern int FtpPort; + static Boolean network_init = 1; int what = DITEM_RESTORE; cp = variable_get(VAR_FTP_PATH); @@ -291,13 +292,20 @@ mediaSetFTP(dialogMenuItem *self) } strcpy(ftpDevice.name, cp); - if (!tcpDeviceSelect()) - return DITEM_FAILURE | what; - if (!mediaDevice || !mediaDevice->init(mediaDevice)) { - if (isDebug()) - msgDebug("mediaSetFTP: Net device init failed.\n"); - return DITEM_FAILURE | what; + dialog_clear_norefresh(); + if (network_init || msgYesNo("You've already done the network configuration once,\n" + "would you like to skip over it now?")) { + if (!tcpDeviceSelect()) + return DITEM_FAILURE | what; + if (!network_init) + mediaDevice->shutdown(mediaDevice); + if (!mediaDevice || !mediaDevice->init(mediaDevice)) { + if (isDebug()) + msgDebug("mediaSetFTP: Net device init failed.\n"); + return DITEM_FAILURE | what; + } } + network_init = FALSE; hostname = cp + 6; if ((cp = index(hostname, ':')) != NULL) { *(cp++) = '\0'; @@ -318,6 +326,7 @@ mediaSetFTP(dialogMenuItem *self) msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\n" "name server, gateway and network interface are correctly configured?", hostname); mediaDevice->shutdown(mediaDevice); + network_init = TRUE; return DITEM_FAILURE | what; } } |