Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/init If /dev/constty exists, use it instead of /dev/con...



details:   https://anonhg.NetBSD.org/src/rev/8b3372864b0d
branches:  trunk
changeset: 552795:8b3372864b0d
user:      dsl <dsl%NetBSD.org@localhost>
date:      Fri Oct 03 13:31:32 2003 +0000

description:
If /dev/constty exists, use it instead of /dev/console for single user shell.
I'm not 100% certain it should call login_tty() for anything else.

diffstat:

 sbin/init/init.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 62b43c789c22 -r 8b3372864b0d sbin/init/init.c
--- a/sbin/init/init.c  Fri Oct 03 13:17:12 2003 +0000
+++ b/sbin/init/init.c  Fri Oct 03 13:31:32 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init.c,v 1.62 2003/09/11 12:51:51 dsl Exp $    */
+/*     $NetBSD: init.c,v 1.63 2003/10/03 13:31:32 dsl Exp $    */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)init.c     8.2 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: init.c,v 1.62 2003/09/11 12:51:51 dsl Exp $");
+__RCSID("$NetBSD: init.c,v 1.63 2003/10/03 13:31:32 dsl Exp $");
 #endif
 #endif /* not lint */
 
@@ -577,7 +577,10 @@
                /*
                 * Start the single user session.
                 */
-               setctty(_PATH_CONSOLE);
+               if (access(_PATH_CONSTTY, F_OK) == 0)
+                       setctty(_PATH_CONSTTY);
+               else
+                       setctty(_PATH_CONSOLE);
 
 #ifdef SECURE
                /*



Home | Main Index | Thread Index | Old Index