diff options
author | peter <peter@FreeBSD.org> | 1995-09-18 16:53:06 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1995-09-18 16:53:06 +0000 |
commit | 89e0ab3dba9ef542f52287fd1820072c4de7d393 (patch) | |
tree | d8d32666544a3c5d9db7a5472c5fa4292681da66 /usr.sbin/sysinstall/network.c | |
parent | ea496cc61fd7886ad990ab3876ac97ea2530a3bd (diff) | |
download | FreeBSD-src-89e0ab3dba9ef542f52287fd1820072c4de7d393.zip FreeBSD-src-89e0ab3dba9ef542f52287fd1820072c4de7d393.tar.gz |
This mega-commit brings in Jordan's latest sysinstall version..
This looks like it was developed offline, and is being spammed over the
top of the existing. "That's fine by me! I dont really care how you do
it, just get it in there..." said Jordan in a conversation a short while
ago...
Diffstat (limited to 'usr.sbin/sysinstall/network.c')
-rw-r--r-- | usr.sbin/sysinstall/network.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/usr.sbin/sysinstall/network.c b/usr.sbin/sysinstall/network.c index 526f3de..821e57a 100644 --- a/usr.sbin/sysinstall/network.c +++ b/usr.sbin/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)) { |