diff options
author | jkh <jkh@FreeBSD.org> | 1996-12-11 19:35:26 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-12-11 19:35:26 +0000 |
commit | 85d529aa13a467a7a2632d7ff2e9fff71d6c4c91 (patch) | |
tree | 75585051a07341502e494752cc5953c1a47489ca /release/sysinstall/system.c | |
parent | 04f954db47add4c442bfc5ab23e5bfb3ec166ced (diff) | |
download | FreeBSD-src-85d529aa13a467a7a2632d7ff2e9fff71d6c4c91.zip FreeBSD-src-85d529aa13a467a7a2632d7ff2e9fff71d6c4c91.tar.gz |
Cosmetic tweaks, initialize a few variables, fix a reversed conditional.
Diffstat (limited to 'release/sysinstall/system.c')
-rw-r--r-- | release/sysinstall/system.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c index 86e3a04..579a856 100644 --- a/release/sysinstall/system.c +++ b/release/sysinstall/system.c @@ -4,7 +4,7 @@ * This is probably the last program in the `sysinstall' line - the next * generation being essentially a complete rewrite. * - * $Id: system.c,v 1.66 1996/10/01 12:13:29 jkh Exp $ + * $Id: system.c,v 1.67 1996/12/09 06:02:32 jkh Exp $ * * Jordan Hubbard * @@ -83,6 +83,13 @@ systemInitialize(int argc, char **argv) setbuf(stdin, 0); setbuf(stderr, 0); } + else { + char hname[256]; + + /* Initalize various things for a multi-user environment */ + if (!gethostname(hname, sizeof hname)) + variable_set2(VAR_HOSTNAME, hname); + } if (set_termcap() == -1) { printf("Can't find terminal entry\n"); @@ -292,12 +299,14 @@ systemCreateHoloshell(void) struct termios foo; extern int login_tty(int); + ioctl(0, TIOCNOTTY, NULL); for (i = getdtablesize(); i; i--) close(i); - DebugFD = fd = open("/dev/ttyv3", O_RDWR); + fd = open("/dev/ttyv3", O_RDWR); ioctl(0, TIOCSCTTY, &fd); dup2(0, 1); dup2(0, 2); + DebugFD = 2; if (login_tty(fd) == -1) msgDebug("Doctor: I can't set the controlling terminal.\n"); signal(SIGTTOU, SIG_IGN); |