summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/system.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-24 22:37:44 +0000
committerjkh <jkh@FreeBSD.org>1995-05-24 22:37:44 +0000
commitf12325f10506a028f4908783cd3ee6224ed86bbf (patch)
tree2126dd375a22d9a5509cad1e3f4982b216d40218 /release/sysinstall/system.c
parent2f34e0b4e61258aab1d6085f83a3a74ceff943d5 (diff)
downloadFreeBSD-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 'release/sysinstall/system.c')
-rw-r--r--release/sysinstall/system.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c
index cd62dd2..e5b685b 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 ! */
OpenPOWER on IntegriCloud