diff options
author | jkh <jkh@FreeBSD.org> | 1996-06-17 21:48:33 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-06-17 21:48:33 +0000 |
commit | a2bb2b476e1128fb5b0bd7bb1894f9ccbd96d751 (patch) | |
tree | d7f069af161fed62d57b0408f72958b9b8d05b0d /usr.sbin/sysinstall/media.c | |
parent | 257dcecd299fb32452b70b4e78fcd722579e97d0 (diff) | |
download | FreeBSD-src-a2bb2b476e1128fb5b0bd7bb1894f9ccbd96d751.zip FreeBSD-src-a2bb2b476e1128fb5b0bd7bb1894f9ccbd96d751.tar.gz |
Init network at proper time.
Diffstat (limited to 'usr.sbin/sysinstall/media.c')
-rw-r--r-- | usr.sbin/sysinstall/media.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c index de6e697..bd54d00 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.39 1996/06/08 07:02:21 jkh Exp $ + * $Id: media.c,v 1.40 1996/06/16 21:57:31 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -288,6 +288,11 @@ mediaSetFTP(dialogMenuItem *self) if (!tcpDeviceSelect()) return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE; + if (!mediaDevice || !mediaDevice->init(mediaDevice)) { + if (isDebug()) + msgDebug("mediaSetFTP: Net device init failed.\n"); + return DITEM_FAILURE | DITEM_RESTORE | DITEM_RECREATE; + } hostname = cp + 6; if ((cp = index(hostname, ':')) != NULL) { *(cp++) = '\0'; @@ -310,7 +315,7 @@ mediaSetFTP(dialogMenuItem *self) } variable_set2(VAR_FTP_HOST, hostname); variable_set2(VAR_FTP_DIR, dir ? dir : "/"); - + variable_set2(VAR_FTP_PORT, itoa(port)); ftpDevice.type = DEVICE_TYPE_FTP; ftpDevice.init = mediaInitFTP; ftpDevice.get = mediaGetFTP; @@ -376,6 +381,11 @@ mediaSetNFS(dialogMenuItem *self) /* str == NULL means we were just called to change NFS paths, not network interfaces */ if (!tcpDeviceSelect()) return DITEM_FAILURE; + if (!mediaDevice || !mediaDevice->init(mediaDevice)) { + if (isDebug()) + msgDebug("mediaSetNFS: Net device init failed\n"); + return DITEM_FAILURE; + } *idx = '\0'; msgNotify("Looking up host %s..", cp); if ((gethostbyname(cp) == NULL) && (inet_addr(cp) == INADDR_NONE)) { |