diff options
author | sobomax <sobomax@FreeBSD.org> | 2003-01-19 20:59:52 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2003-01-19 20:59:52 +0000 |
commit | 2435c6cf8e51ac2b5c027b532506b2793273906a (patch) | |
tree | 1d6109d4a434694ae479e11d572d9b8bb4234d84 /libexec | |
parent | 9a5444fa22590bd7085bf29842d9be2f417a1a0b (diff) | |
download | FreeBSD-src-2435c6cf8e51ac2b5c027b532506b2793273906a.zip FreeBSD-src-2435c6cf8e51ac2b5c027b532506b2793273906a.tar.gz |
Add a new gettytab(5) option - `pl', which if set tells getty that the line
in question is PPP-only line, i.e. no PPP-sequence detection is necessary and
PPP login program referenced by `pp' should be started automatically instead of
login(1)
Feature suggested and sponsored by: United Networks of Ukraine
No reply from: re
MFC after: 2 weeks
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/getty/gettytab.5 | 2 | ||||
-rw-r--r-- | libexec/getty/gettytab.h | 2 | ||||
-rw-r--r-- | libexec/getty/init.c | 1 | ||||
-rw-r--r-- | libexec/getty/main.c | 6 |
4 files changed, 7 insertions, 4 deletions
diff --git a/libexec/getty/gettytab.5 b/libexec/getty/gettytab.5 index eaabac0..3e2e9b5 100644 --- a/libexec/getty/gettytab.5 +++ b/libexec/getty/gettytab.5 @@ -159,6 +159,8 @@ hangup line on last close .It "pf num 0 delay" between first prompt and following flush (seconds) .It "pp str unused PPP authentication program" +.It "pl bool false don't detect PPP sequence, but start PPP login" +program referenced by pp automatically .It "ps bool false line connected to a" .Tn MICOM port selector diff --git a/libexec/getty/gettytab.h b/libexec/getty/gettytab.h index b8b0365..1b95bf9 100644 --- a/libexec/getty/gettytab.h +++ b/libexec/getty/gettytab.h @@ -173,4 +173,4 @@ struct gettyflags { #define MB gettyflags[22].value #define HW gettyflags[23].value #define NC gettyflags[24].value - +#define PL gettyflags[25].value diff --git a/libexec/getty/init.c b/libexec/getty/init.c index dae64b2..274e418 100644 --- a/libexec/getty/init.c +++ b/libexec/getty/init.c @@ -149,5 +149,6 @@ struct gettyflags gettyflags[] = { { "mb", 0 }, /* do MDMBUF flow control */ { "hw", 0 }, /* do CTSRTS flow control */ { "nc", 0 }, /* set clocal (no carrier) */ + { "pl", 0 }, /* use PPP instead of login(1) */ { 0 } }; diff --git a/libexec/getty/main.c b/libexec/getty/main.c index 1c1a7b8..20a5d9a 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -332,7 +332,7 @@ main(int argc, char *argv[]) } first_time = 0; - if (IM && *IM) + if (IM && *IM !(PL && PP)) putf(IM); if (setjmp(timeout)) { cfsetispeed(&tmode, B0); @@ -357,9 +357,9 @@ main(int argc, char *argv[]) digit++; *q++ = *p++; } - } else + } else if (!(PL && PP)) rval = getname(); - if (rval == 2) { + if (rval == 2 || (PL && PP)) { oflush(); alarm(0); limit.rlim_max = RLIM_INFINITY; |