summaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/system.c
diff options
context:
space:
mode:
authorPaul Traina <pst@FreeBSD.org>1996-09-26 21:07:11 +0000
committerPaul Traina <pst@FreeBSD.org>1996-09-26 21:07:11 +0000
commit09bef27f97f8968d7731b3afcfe8d3b8d8b76ff4 (patch)
tree148d468cb6aed490402c77706c933a587ee203d2 /usr.sbin/sysinstall/system.c
parent5319e113ebda1cb478fbbbf9a76fcb97d54a394a (diff)
Notes
Diffstat (limited to 'usr.sbin/sysinstall/system.c')
-rw-r--r--usr.sbin/sysinstall/system.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c
index ad89994acc8e..80162f172277 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.62 1996/07/10 11:38:29 jkh Exp $
+ * $Id: system.c,v 1.63 1996/08/01 10:58:54 jkh Exp $
*
* Jordan Hubbard
*
@@ -65,7 +65,11 @@ systemInitialize(int argc, char **argv)
/* Are we running as init? */
if (getpid() == 1) {
setsid();
- close(0); open("/dev/ttyv0", O_RDWR);
+ close(0);
+ if (open("/dev/ttyv0", O_RDWR) < 0)
+ open("/dev/console", O_RDWR);
+ else
+ OnVTY = TRUE;
close(1); dup(0);
close(2); dup(0);
printf("%s running as init\n", argv[0]);