git: ttys - Add 'ifconsole' option to ttys entries

Matthew Dillon dillon at crater.dragonflybsd.org
Tue May 26 13:13:01 PDT 2015


commit fda9d7927d5b74c2012759fea990a5cd57658131
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Tue May 26 13:01:25 2015 -0700

    ttys - Add 'ifconsole' option to ttys entries
    
    * Add the 'ifconsole' option.  This allows you to construct a line as shown
      below to enable a getty (e.g. on a serial port) only if the tty is the
      system console.
    
        ttyd0   "/usr/libexec/getty std.9600"   dialup  on secure ifconsole
    
      The ifconsole option also silently disables any devices which do not
      exist, removing unnecessary console spam.
    
    * Modify libc and init to handle the new flag.
    
    * Modify the nrelease build and ttys defaults to use this option for
      ttyd0, ttyd1, ttyd2, and ttyd3.
    
    * Avoids previously reported issues with system crashes on certain machines
      whos serial ports are not implemented properly without having to fully
      disable the default ttyd* getty feature.  If the serial port isn't the
      console, it won't be enabled.
    
    * Add a sysctl to the kernel which init needs to test whether a tty is the
      console or not.
    
    Suggested-by: swildner

Summary of changes:
 etc/etc.i386/ttys        | 14 +++++++-------
 etc/etc.x86_64/ttys      | 14 +++++++-------
 include/ttyent.h         |  2 ++
 lib/libc/gen/getttyent.c |  2 ++
 libexec/getty/ttys.5     |  5 ++++-
 nrelease/gui/etc/ttys    | 14 +++++++-------
 nrelease/root/etc/ttys   | 13 ++++++-------
 sbin/init/init.c         | 47 ++++++++++++++++++++++++++++++++++++++++-------
 sys/kern/tty_cons.c      | 10 ++++++++++
 9 files changed, 85 insertions(+), 36 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/fda9d7927d5b74c2012759fea990a5cd57658131


-- 
DragonFly BSD source repository



More information about the Commits mailing list