diff options
author | jkh <jkh@FreeBSD.org> | 1995-05-24 22:37:44 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1995-05-24 22:37:44 +0000 |
commit | f12325f10506a028f4908783cd3ee6224ed86bbf (patch) | |
tree | 2126dd375a22d9a5509cad1e3f4982b216d40218 /usr.sbin/sysinstall/system.c | |
parent | 2f34e0b4e61258aab1d6085f83a3a74ceff943d5 (diff) | |
download | FreeBSD-src-f12325f10506a028f4908783cd3ee6224ed86bbf.zip FreeBSD-src-f12325f10506a028f4908783cd3ee6224ed86bbf.tar.gz |
1. Spawn a shell on VTY4 and leave it lying around.
2. Bring in Gary's prompt stuff in extractGeneric.
3. Add another global for telling when we're running as init.
Diffstat (limited to 'usr.sbin/sysinstall/system.c')
-rw-r--r-- | usr.sbin/sysinstall/system.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index cd62dd2..e5b685b 100644 --- a/usr.sbin/sysinstall/system.c +++ b/usr.sbin/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 ! */ |