]> git.pld-linux.org Git - packages/getty_ps.git/blame - getty_ps-hangup.patch
fixed a small typo
[packages/getty_ps.git] / getty_ps-hangup.patch
CommitLineData
3a965061 1--- getty_ps-2.0.7j/man/getty.1.hangup Sat Jun 10 13:28:58 2000
2+++ getty_ps-2.0.7j/man/getty.1 Sat Jun 10 13:30:50 2000
3@@ -24,7 +24,9 @@
4 .B /etc/getty
5 [\-d
6 .I defaults_file]
7-[\-a] [\-h] [\-r
8+[\-a] [\-h] [\-H
9+.I hangupsecs]
10+[\-r
11 .I delay]
12 [\-t
13 .I timeout]
14@@ -118,7 +120,12 @@
15 flag (or
16 .B HANGUP=NO
17 is specified in the defaults file), it will force a hangup on the line
18-by setting the speed to zero. Giving
19+by setting the speed to zero. You can specify the amount of time
20+to leave the line on-hook during a hangup by specifying the
21+.B \-H
22+flag followed by a number of seconds (or using
23+.BI HANGUPSECS = hangupsecs
24+in the defaults file). Giving
25 .B \-r
26 .I delay
27 on the command line (or using
28--- getty_ps-2.0.7j/main.c.hangup Sat Jun 10 13:23:59 2000
29+++ getty_ps-2.0.7j/main.c Sat Jun 10 13:28:11 2000
30@@ -184,7 +184,7 @@
31 waitfor = (char *) NULL; /* no waitfor string */
32 Connect = (char *) NULL; /* no connect string */
33 defname = (char *) NULL; /* no defaults file */
34-
35+ HangUpSecs = 2; /* # of seconds to hangup the line */
36 #ifdef ISSUE
37 issue = ISSUE; /* login banner */
38 #endif /* ISSUE */
39@@ -313,7 +313,7 @@
40 /* first, the command line
41 */
42
43- while((c = getopt(count, args, "RC:D:ac:d:hr:t:w:")) != EOF) {
44+ while((c = getopt(count, args, "RC:D:ac:d:hr:t:w:H:")) != EOF) {
45 switch(c) {
46 #ifdef RBGETTY
47 case 'R':
48@@ -355,6 +355,9 @@
49 waitchar = TRUE;
50 waitfor = optarg;
51 break;
52+ case 'H':
53+ HangUpSecs = (unsigned) atoi(optarg);
54+ break;
55 case '?':
56 exit_usage(2);
57 }
58@@ -432,6 +435,12 @@
59 NoHangUp = TRUE;
60 if((p = defvalue(def, "WAITCHAR")) && (strequal(p, "YES")))
61 waitchar = TRUE;
62+ if((p = defvalue(def, "HANGUPSECS")))
63+ HangUpSecs = (unsigned) atoi(p);
64+ if (HangUpSecs < 2 || HangUpSecs > 600) {
65+ logerr("Value for HANGUPSECS on %s should be between 2 and 600 secs", Device);
66+ HangUpSecs = 2;
67+ }
68 if((p = defvalue(def, "DELAY"))) delay = (unsigned) atoi(p);
69 if((p = defvalue(def, "TIMEOUT"))) TimeOut = atoi(p);
70 if((p = defvalue(def, "CONNECT"))) Connect = p;
71@@ -666,7 +675,7 @@
72 termio.c_cflag |= B0;
73 }
74 (void) ioctl(fd, TCSETSF, &termio);
75- if(! NoHangUp) sleep(2);
76+ if(! NoHangUp) sleep(HangUpSecs);
77 gtab = gtabvalue(GtabId, G_FORCE);
78 settermio(&(gtab->itermio), INITIAL);
79 #ifndef GDB_FRIENDLY
80--- getty_ps-2.0.7j/extern.h.hangup Sat Jun 10 13:28:16 2000
81+++ getty_ps-2.0.7j/extern.h Sat Jun 10 13:28:45 2000
82@@ -54,6 +54,7 @@
83 EXTERN char *SysName; /* nodename of system */
84 EXTERN int TimeOut; /* timeout value from command line */
85 EXTERN char *Version; /* value of VERSION */
86+EXTERN int HangUpSecs; /* Number of seconds to hang up the line */
87
88 #ifdef WARNCASE
89 EXTERN boolean WarnCase; /* controls display of bad case message */
This page took 0.082342 seconds and 4 git commands to generate.