diff options
| author | Peter Wemm <peter@FreeBSD.org> | 1995-09-18 16:53:06 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 1995-09-18 16:53:06 +0000 |
| commit | 5326bef3dea504bf1e33213fdca6903b39e0a8bc (patch) | |
| tree | d8d32666544a3c5d9db7a5472c5fa4292681da66 /release/sysinstall/network.c | |
| parent | 5cbf3e086c556538a726bb9438b8e4ba0c960ff7 (diff) | |
Notes
Diffstat (limited to 'release/sysinstall/network.c')
| -rw-r--r-- | release/sysinstall/network.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/release/sysinstall/network.c b/release/sysinstall/network.c index 526f3de4bd9b..821e57ac4d06 100644 --- a/release/sysinstall/network.c +++ b/release/sysinstall/network.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: network.c,v 1.6.2.14 1995/06/07 09:26:29 jkh Exp $ + * $Id: network.c,v 1.7.2.2 1995/07/21 10:57:33 rgrimes Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -57,8 +57,9 @@ mediaInitNetwork(Device *dev) { int i; char *rp; + char *cp, ifconfig[64]; - if (networkInitialized || (dev->flags & OPT_LEAVE_NETWORK_UP)) + if (!RunningAsInit || networkInitialized || (dev->flags & OPT_LEAVE_NETWORK_UP)) return TRUE; configResolv(); @@ -82,30 +83,25 @@ mediaInitNetwork(Device *dev) return FALSE; else strcpy(attach, val); - if (!vsystem(attach)) { + if (!vsystem(attach)) dev->private = NULL; - return TRUE; - } else { msgConfirm("slattach returned a bad status! Please verify that\nthe command is correct and try again."); return FALSE; } } } - else { - char *cp, ifconfig[64]; - snprintf(ifconfig, 64, "%s%s", VAR_IFCONFIG, dev->name); - cp = getenv(ifconfig); - if (!cp) { - msgConfirm("The %s device is not configured. You will need to do so\nin the Networking configuration menu before proceeding."); - return FALSE; - } - i = vsystem("ifconfig %s %s", dev->name, cp); - if (i) { - msgConfirm("Unable to configure the %s interface!\nThis installation method cannot be used.", dev->name); - return FALSE; - } + snprintf(ifconfig, 64, "%s%s", VAR_IFCONFIG, dev->name); + cp = getenv(ifconfig); + if (!cp) { + msgConfirm("The %s device is not configured. You will need to do so\nin the Networking configuration menu before proceeding."); + return FALSE; + } + i = vsystem("ifconfig %s %s", "sl0", cp); + if (i) { + msgConfirm("Unable to configure the %s interface!\nThis installation method cannot be used.", dev->name); + return FALSE; } rp = getenv(VAR_GATEWAY); @@ -122,7 +118,7 @@ mediaShutdownNetwork(Device *dev) { char *cp; - if (!networkInitialized || (dev->flags & OPT_LEAVE_NETWORK_UP)) + if (!RunningAsInit || !networkInitialized || (dev->flags & OPT_LEAVE_NETWORK_UP)) return; if (strncmp("cuaa", dev->name, 4)) { |
