From 06c34bfded6c9af144bb3dbf59f196cde5845f73 Mon Sep 17 00:00:00 2001 From: jkh Date: Sun, 28 May 1995 09:36:06 +0000 Subject: [PATCH] Try again to redirect the console back before rebooting. --- release/sysinstall/system.c | 8 +++++--- usr.sbin/sade/system.c | 8 +++++--- usr.sbin/sysinstall/system.c | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c index a98d52fd8bd2..11058f69fb93 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.37 1995/05/26 20:31:00 jkh Exp $ + * $Id: system.c,v 1.38 1995/05/26 21:00:43 jkh Exp $ * * Jordan Hubbard * @@ -102,10 +102,12 @@ systemShutdown(void) } /* REALLY exit! */ if (RunningAsInit) { - int on = 1; + int fd, on = 1; /* Put the console back */ - ioctl(0, TIOCCONS, &on); + fd = open("/dev/ttyv0", O_RDONLY); + if (fd != -1) + ioctl(fd, TIOCCONS, &on); reboot(RB_HALT); } else diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c index a98d52fd8bd2..11058f69fb93 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.37 1995/05/26 20:31:00 jkh Exp $ + * $Id: system.c,v 1.38 1995/05/26 21:00:43 jkh Exp $ * * Jordan Hubbard * @@ -102,10 +102,12 @@ systemShutdown(void) } /* REALLY exit! */ if (RunningAsInit) { - int on = 1; + int fd, on = 1; /* Put the console back */ - ioctl(0, TIOCCONS, &on); + fd = open("/dev/ttyv0", O_RDONLY); + if (fd != -1) + ioctl(fd, TIOCCONS, &on); reboot(RB_HALT); } else diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c index a98d52fd8bd2..11058f69fb93 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.37 1995/05/26 20:31:00 jkh Exp $ + * $Id: system.c,v 1.38 1995/05/26 21:00:43 jkh Exp $ * * Jordan Hubbard * @@ -102,10 +102,12 @@ systemShutdown(void) } /* REALLY exit! */ if (RunningAsInit) { - int on = 1; + int fd, on = 1; /* Put the console back */ - ioctl(0, TIOCCONS, &on); + fd = open("/dev/ttyv0", O_RDONLY); + if (fd != -1) + ioctl(fd, TIOCCONS, &on); reboot(RB_HALT); } else