From b2a1dd44dc4f36d50d47dd74d99035289e55ef18 Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Tue, 31 Dec 1996 01:30:38 +0000 Subject: Add a new 'de' capability, specifying a number of seconds to sleep before emitting the initial prompt. This is useful in a number of circumstances : - you have (a) stupid modem(s) that assert(s) DCD too soon. - you have dialin users with stupid diallers and poorly written chatscripts. (esp. some Winsock diallers) BSD/OS also has this capability. Submitted by: damian@cablenet.net (Damian Hamill) --- libexec/getty/gettytab.5 | 3 ++- libexec/getty/gettytab.h | 3 ++- libexec/getty/init.c | 6 ++++-- libexec/getty/main.c | 8 +++++++- 4 files changed, 15 insertions(+), 5 deletions(-) (limited to 'libexec') diff --git a/libexec/getty/gettytab.5 b/libexec/getty/gettytab.5 index b14f6e1f6e54c..8c4e12b73d916 100644 --- a/libexec/getty/gettytab.5 +++ b/libexec/getty/gettytab.5 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" from: @(#)gettytab.5 8.4 (Berkeley) 4/19/94 -.\" $Id: gettytab.5,v 1.9 1996/11/13 01:36:52 pst Exp $ +.\" $Id: gettytab.5,v 1.10 1996/12/14 23:27:00 mpp Exp $ .\" " .Dd April 19, 1994 .Dt GETTYTAB 5 @@ -88,6 +88,7 @@ table. .It "co bool false console - add" .Ql \en after login prompt +.It "de num 0 delay secs before writing first prompt" .It "ds str" Ta So Li ^Y Sc Ta .No "delayed suspend character" .It "dx bool false set" diff --git a/libexec/getty/gettytab.h b/libexec/getty/gettytab.h index 8a673156b9072..d247c8efd422c 100644 --- a/libexec/getty/gettytab.h +++ b/libexec/getty/gettytab.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)gettytab.h 8.2 (Berkeley) 3/30/94 - * $Id: gettytab.h,v 1.3 1996/05/05 19:01:09 joerg Exp $ + * $Id: gettytab.h,v 1.4 1996/11/13 01:06:38 pst Exp $ */ /* @@ -131,6 +131,7 @@ struct gettyflags { #define O1set gettynums[23].set #define O2 gettynums[24].value #define O2set gettynums[24].set +#define DE gettynums[25].value /* * Boolean values. diff --git a/libexec/getty/init.c b/libexec/getty/init.c index 394cb3e474f77..652226486b12b 100644 --- a/libexec/getty/init.c +++ b/libexec/getty/init.c @@ -33,7 +33,7 @@ #ifndef lint /*static char sccsid[] = "from: @(#)init.c 8.1 (Berkeley) 6/4/93";*/ -static char rcsid[] = "$Id: init.c,v 1.3 1996/05/05 19:01:09 joerg Exp $"; +static char rcsid[] = "$Id: init.c,v 1.4 1996/11/13 01:06:39 pst Exp $"; #endif /* not lint */ /* @@ -106,8 +106,10 @@ struct gettynums gettynums[] = { { "o0" }, /* output o_flags */ { "o1" }, /* input o_flags */ { "o2" }, /* user mode o_flags */ - { 0 } + { "de" }, /* delay before sending 1st prompt */ + { 0 } }; + struct gettyflags gettyflags[] = { { "ht", 0 }, /* has tabs */ diff --git a/libexec/getty/main.c b/libexec/getty/main.c index 5f6c2de609b09..b16843429e4f7 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -39,7 +39,7 @@ static char copyright[] = #ifndef lint /*static char sccsid[] = "from: @(#)main.c 8.1 (Berkeley) 6/20/93";*/ -static char rcsid[] = "$Id: main.c,v 1.10 1996/05/07 16:42:26 ache Exp $"; +static char rcsid[] = "$Id: main.c,v 1.11 1996/11/13 01:06:40 pst Exp $"; #endif /* not lint */ #include @@ -292,6 +292,12 @@ main(argc, argv) if (CL && *CL) putpad(CL); edithost(HE); + + /* if a delay was specified then sleep for that + number of seconds before writing the initial prompt */ + if(DE) + sleep(DE); + if (IM && *IM) putf(IM); if (setjmp(timeout)) { -- cgit v1.2.3