diff options
author | Denys Vlasenko | 2015-10-19 01:20:36 +0200 |
---|---|---|
committer | Denys Vlasenko | 2015-10-19 01:20:36 +0200 |
commit | 95dee81a465668151cff3ffd757456a9a10c1f1f (patch) | |
tree | a9f128900d1fc484f26cd521525907fa1af262c0 /loginutils/getty.c | |
parent | 28826ac8c02793431203edb4adb961d5521d643d (diff) | |
download | busybox-95dee81a465668151cff3ffd757456a9a10c1f1f.zip busybox-95dee81a465668151cff3ffd757456a9a10c1f1f.tar.gz |
loginutils/*: convert to new-style "one file" applets
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils/getty.c')
-rw-r--r-- | loginutils/getty.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c index 762d5c7..b10bdbd 100644 --- a/loginutils/getty.c +++ b/loginutils/getty.c @@ -21,6 +21,28 @@ * * Licensed under GPLv2 or later, see file LICENSE in this source tree. */ +//config:config GETTY +//config: bool "getty" +//config: default y +//config: select FEATURE_SYSLOG +//config: help +//config: getty lets you log in on a tty. It is normally invoked by init. +//config: +//config: Note that you can save a few bytes by disabling it and +//config: using login applet directly. +//config: If you need to reset tty attributes before calling login, +//config: this script approximates getty: +//config: +//config: exec </dev/$1 >/dev/$1 2>&1 || exit 1 +//config: reset +//config: stty sane; stty ispeed 38400; stty ospeed 38400 +//config: printf "%s login: " "`hostname`" +//config: read -r login +//config: exec /bin/login "$login" + +//applet:IF_GETTY(APPLET(getty, BB_DIR_SBIN, BB_SUID_DROP)) + +//kbuild:lib-$(CONFIG_GETTY) += getty.o #include "libbb.h" #include <syslog.h> |