diff options
author | msmith <msmith@FreeBSD.org> | 1996-12-31 01:30:38 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1996-12-31 01:30:38 +0000 |
commit | 0368cd4304524bd043bd10360cd198e69a0c897f (patch) | |
tree | c74e80b83b7b03f1b165069b9203ae006dd8872b /libexec | |
parent | 052fd9ee5f2f4522b9f5817808e5ee7afb52b13b (diff) | |
download | FreeBSD-src-0368cd4304524bd043bd10360cd198e69a0c897f.zip FreeBSD-src-0368cd4304524bd043bd10360cd198e69a0c897f.tar.gz |
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)
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/getty/gettytab.5 | 3 | ||||
-rw-r--r-- | libexec/getty/gettytab.h | 3 | ||||
-rw-r--r-- | libexec/getty/init.c | 6 | ||||
-rw-r--r-- | libexec/getty/main.c | 8 |
4 files changed, 15 insertions, 5 deletions
diff --git a/libexec/getty/gettytab.5 b/libexec/getty/gettytab.5 index b14f6e1..8c4e12b 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 8a67315..d247c8e 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 394cb3e..6522264 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 5f6c2de..b168434 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 <sys/param.h> @@ -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)) { |