summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/media.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-10-02 02:02:18 +0000
committerjkh <jkh@FreeBSD.org>1996-10-02 02:02:18 +0000
commitb19ed7e5c87dd66648a79bf26d67628ff3478259 (patch)
treef21627d4a0804358e133b0e361f507df7ac38c55 /usr.sbin/sysinstall/media.c
parentc5daba2dfdde4dcede28aefd521ce3e716d42a70 (diff)
downloadFreeBSD-src-b19ed7e5c87dd66648a79bf26d67628ff3478259.zip
FreeBSD-src-b19ed7e5c87dd66648a79bf26d67628ff3478259.tar.gz
Don't annoyingly reconfigure the network when you don't have to.
Diffstat (limited to 'usr.sbin/sysinstall/media.c')
-rw-r--r--usr.sbin/sysinstall/media.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c
index 580f3b4..33ac214 100644
--- a/usr.sbin/sysinstall/media.c
+++ b/usr.sbin/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;
}
}
OpenPOWER on IntegriCloud