diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-23 18:06:16 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-23 18:06:16 +0000 |
commit | 1503917ec9b489a39b5b6852d0dd4da1e98df07a (patch) | |
tree | 8166ea8807c2f301839ed0dfc6658a8942d1f428 /usr.sbin/sysinstall/config.c | |
parent | 44080e30b5035fd5c72753df7b50234d49db0c84 (diff) | |
download | FreeBSD-src-1503917ec9b489a39b5b6852d0dd4da1e98df07a.zip FreeBSD-src-1503917ec9b489a39b5b6852d0dd4da1e98df07a.tar.gz |
Add my first cut at TCP/IP device configuration. If this works, the
ftp installation method should now function. We'll know as soon as my
make release builds the floppies. I'm just committing this out of my
release tree now so that it doesn't get clobbered again.
Diffstat (limited to 'usr.sbin/sysinstall/config.c')
-rw-r--r-- | usr.sbin/sysinstall/config.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index 526f1cc..881d875 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: install.c,v 1.47 1995/05/22 14:10:17 jkh Exp $ + * $Id: config.c,v 1.1 1995/05/23 02:40:50 jkh Exp $ * * Copyright (c) 1995 * Jordan Hubbard. All rights reserved. @@ -191,5 +191,24 @@ config_sysconfig(void) void config_resolv(void) { -} + static Boolean alreadyDone = FALSE; + FILE *fp; + + if (alreadyDone) + return; + if (!getenv(VAR_DOMAINNAME) || !getenv(VAR_NAMESERVER)) { + msgConfirm("Warning: You haven't set a domain name or nameserver. You will need\nto configure your /etc/resolv.conf file manually to fully use network services."); + return; + } + Mkdir("/etc", NULL); + fp = fopen("/etc/resolv.conf", "w"); + if (!fp) { + msgConfirm("Unable to open /etc/resolv.conf! You will need to do this manually."); + return; + } + fprintf(fp, "domain\t%s\n", getenv(VAR_DOMAINNAME)); + fprintf(fp, "nameserver\t%s\n", getenv(VAR_NAMESERVER)); + fclose(fp); + alreadyDone = TRUE; +} |