git: DragonFly_RELEASE_6_4 ttys: Add 'ifexists' option to enable ttys only if exists

Aaron LI aly at crater.dragonflybsd.org
Wed Sep 20 22:25:47 PDT 2023


commit 4dcc5d306dfb16e199a8e8ab3d1bd75f6b73dc96
Author: Aaron LI <aly at aaronly.me>
Date:   Wed Sep 20 15:13:41 2023 +0800

    ttys: Add 'ifexists' option to enable ttys only if exists
    
    Implement the 'ifexists' ttys option in init(8) to enable a tty only if
    it exists.  This allows one to turn off getty for ttys that aren't
    present (e.g., on a headless system), and thus prevent getty error logs
    from filling up /var/log/messages; e.g.,
    
    ------
    Sep 20 09:13:07 microserver getty[236362]: open /dev/ttyv0: No such file or directory
    Sep 20 09:13:07 microserver getty[236404]: open /dev/ttyv0: No such file or directory
    Sep 20 09:13:07 microserver getty[236405]: open /dev/ttyv0: No such file or directory
    Sep 20 09:13:07 microserver getty[236406]: open /dev/ttyv0: No such file or directory
    Sep 20 09:13:07 microserver getty[236407]: open /dev/ttyv0: No such file or directory
    Sep 20 09:13:07 microserver init: getty repeating too quickly on port /dev/ttyv0, sleeping 30 secs
    ------
    
    Update the ttys(5) and getttyent(3) man pages accordingly.
    
    The updates to ttys files will follow.
    
    Discussed-with: dillon
    Credit: https://reviews.freebsd.org/D10037

Summary of changes:
 include/ttyent.h         |  2 ++
 lib/libc/gen/getttyent.3 | 12 ++++++------
 lib/libc/gen/getttyent.c |  2 ++
 libexec/getty/ttys.5     |  3 ++-
 sbin/init/init.c         | 20 +++++++++++++++-----
 5 files changed, 27 insertions(+), 12 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4dcc5d306dfb16e199a8e8ab3d1bd75f6b73dc96


-- 
DragonFly BSD source repository


More information about the Commits mailing list