diff options
| author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-05-24 22:37:44 +0000 |
|---|---|---|
| committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1995-05-24 22:37:44 +0000 |
| commit | e336d945a8d958d0c60251569a0b8fee1a5f307f (patch) | |
| tree | 2126dd375a22d9a5509cad1e3f4982b216d40218 /release/sysinstall/system.c | |
| parent | 72e242ff9a783b2fce3239f269f7c4490c113831 (diff) | |
Notes
Diffstat (limited to 'release/sysinstall/system.c')
| -rw-r--r-- | release/sysinstall/system.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c index cd62dd21805d..e5b685bfb41d 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.28 1995/05/21 06:12:44 phk Exp $ + * $Id: system.c,v 1.29 1995/05/23 02:41:18 jkh Exp $ * * Jordan Hubbard * @@ -85,6 +85,18 @@ systemInitialize(int argc, char **argv) exit(-1); } + /* If we're running as init, stick a shell over on the 4th VTY */ + if (RunningAsInit && !fork()) { + int i; + + for (i = 0; i < 64; i++) + close(i); + open("/dev/ttyv3", O_RDWR); + ioctl(0, TIOCSCTTY, (char *)NULL); + dup2(0, 1); + dup2(0, 2); + } + /* XXX - libdialog has particularly bad return value checking */ init_dialog(); /* If we haven't crashed I guess dialog is running ! */ |
