aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/install.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1995-05-26 20:45:20 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1995-05-26 20:45:20 +0000
commit395dda4194b2684375bcc0d16286db701d37e398 (patch)
treefc57a9165a12e93458ba530ae017299f96ef8665 /usr.sbin/sysinstall/install.c
parenta7f54e2e75c372680acaba606d31cb594aea0b57 (diff)
downloadsrc-395dda4194b2684375bcc0d16286db701d37e398.tar.gz
src-395dda4194b2684375bcc0d16286db701d37e398.zip
Clean up the variable handling code a little.
Write /etc/hosts in the right place.
Notes
Notes: svn path=/head/; revision=8771
Diffstat (limited to 'usr.sbin/sysinstall/install.c')
-rw-r--r--usr.sbin/sysinstall/install.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index fad31d7fd1a4..6d6f86db9218 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.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.58 1995/05/26 10:20:46 jkh Exp $
+ * $Id: install.c,v 1.59 1995/05/26 10:32:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -220,12 +220,20 @@ static void
installFinal(void)
{
static Boolean alreadyDone = FALSE;
+ FILE *fp;
if (alreadyDone)
return;
configFstab();
configSysconfig();
configResolv();
+
+ /* Tack ourselves at the end of /etc/hosts */
+ if (getenv(VAR_IPADDR)) {
+ fp = fopen("/etc/hosts", "a");
+ fprintf(fp, "%s\t\t%s\n", getenv(VAR_IPADDR), getenv(VAR_HOSTNAME));
+ fclose(fp);
+ }
alreadyDone = TRUE;
msgConfirm("Installation completed successfully.\nHit return now to go back to the main menu.");
SystemWasInstalled = TRUE;