summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/sade/system.c')
-rw-r--r--usr.sbin/sade/system.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c
index cd62dd2..e5b685b 100644
--- a/usr.sbin/sade/system.c
+++ b/usr.sbin/sade/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