From 1093963d9f5e559f8ac75340a2626c28a7ecd001 Mon Sep 17 00:00:00 2001 From: pst Date: Thu, 26 Sep 1996 21:07:11 +0000 Subject: If we're unable to open /dev/ttyv0, assume that we're on a single tty system and use /dev/console. I really think the proper test is to determine which device has been configured to be the console (remember the RB_SERIAL flag?) and use it instead of always trying to open /dev/ttyv0 first. --- usr.sbin/sysinstall/system.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'usr.sbin/sysinstall/system.c') diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index ad89994..80162f1 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]); -- cgit v1.1