9070 Remove wanboot from gate
[unleashed.git] / usr / src / man / man1 / cktime.1
blobdaf4f94235b0c9644bf7265f1883bba4587d5492
1 '\" te
2 .\"  Copyright 1989 AT&T  Copyright (c) 1992, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH CKTIME 1 "Sep 14, 1992"
7 .SH NAME
8 cktime, errtime, helptime, valtime \- display a prompt; verify and return a
9 time of day
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBcktime\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-f\fR \fIformat\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR]
14      [\fB-e\fR \fIerror\fR] [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
15 .fi
17 .LP
18 .nf
19 \fB/usr/sadm/bin/errtime\fR [\fB-W\fR \fIwidth\fR] [\fB-e\fR \fIerror\fR] [\fB-f\fR \fIformat\fR]
20 .fi
22 .LP
23 .nf
24 \fB/usr/sadm/bin/helptime\fR [\fB-W\fR \fIwidth\fR] [\fB-h\fR \fIhelp\fR] [\fB-f\fR \fIformat\fR]
25 .fi
27 .LP
28 .nf
29 \fB/usr/sadm/bin/valtime\fR [\fB-f\fR \fIformat\fR] \fIinput\fR
30 .fi
32 .SH DESCRIPTION
33 .sp
34 .LP
35 The \fBcktime\fR utility prompts a user and validates the response. It defines,
36 among other things, a prompt message whose response should be a time, text for
37 help and error messages, and a default value (which is returned if the user
38 responds with a RETURN). The user response must match the defined format for
39 the time of day.
40 .sp
41 .LP
42 All messages are limited in length to 70 characters and are formatted
43 automatically. Any white space used in the definition (including \fBNEWLINE)\fR
44 is stripped. The \fB-W\fR option cancels the automatic formatting. When a tilde
45 is placed at the beginning or end of a message definition, the default text is
46 inserted at that point, allowing both custom text and the default text to be
47 displayed.
48 .sp
49 .LP
50 If the prompt, help or error message is not defined, the default message (as
51 defined under \fBNOTES\fR) is displayed.
52 .sp
53 .LP
54 Three visual tool modules are linked to the \fBcktime\fR command. They are
55 \fBerrtime\fR (which formats and displays an error message), \fBhelptime\fR
56 (which formats and displays a help message), and \fBvaltime\fR (which validates
57 a response). These modules should be used in conjunction with  \fBFML\fR
58 objects. In this instance, the \fBFML\fR object defines the prompt. When
59 \fBformat\fR is defined in the \fBerrtime\fR and \fBhelptime\fR modules, the
60 messages will describe the expected format.
61 .SH OPTIONS
62 .sp
63 .LP
64 The following options are supported:
65 .sp
66 .ne 2
67 .na
68 \fB\fB-d\fR\fI default\fR\fR
69 .ad
70 .RS 14n
71 Defines the default value as \fIdefault\fR. The default is not validated and so
72 does not have to meet any criteria.
73 .RE
75 .sp
76 .ne 2
77 .na
78 \fB\fB-e\fR \fIerror\fR\fR
79 .ad
80 .RS 14n
81 Defines the error message as \fIerror\fR.
82 .RE
84 .sp
85 .ne 2
86 .na
87 \fB\fB-f\fR \fIformat\fR\fR
88 .ad
89 .RS 14n
90 Specifies the format against which the input will be verified. Possible formats
91 and their definitions are:
92 .sp
93 .in +2
94 .nf
95 \fB%H\fR  =  hour (00 - 23)
96 \fB%I\fR  =  hour (00 - 12)
97 \fB%M\fR  =  minute (00 - 59)
98 \fB%p\fR  =  ante meridian or post meridian
99 \fB%r\fR  =  time as \fB%I:%M:%S %p\fR
100 \fB%R\fR  =  time as \fB%H:%M\fR (the default format)
101 \fB%S\fR  =  seconds (00 - 59)
102 \fB%T\fR  =  time as \fB%H:%M:%S\fR
104 .in -2
110 .ne 2
112 \fB\fB-h\fR \fIhelp\fR\fR
114 .RS 14n
115 Defines the help messages as \fIhelp\fR.
119 .ne 2
121 \fB\fB-k\fR\fI pid\fR\fR
123 .RS 14n
124 Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
125 chooses to abort.
129 .ne 2
131 \fB\fB-p\fR\fI prompt\fR\fR
133 .RS 14n
134 Defines the prompt message as \fIprompt\fR.
138 .ne 2
140 \fB\fB-Q\fR\fR
142 .RS 14n
143 Specifies that quit will not be allowed as a valid response.
147 .ne 2
149 \fB\fB-s\fR \fIsignal\fR\fR
151 .RS 14n
152 Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
153 is to be sent signal \fIsignal\fR when quit is chosen.  If no signal is
154 specified, \fBSIGTERM\fR is used.
158 .ne 2
160 \fB\fB-W\fR\fI width\fR\fR
162 .RS 14n
163 Specifies that prompt, help and error messages will be formatted to a line
164 length of \fIwidth\fR.
167 .SH OPERANDS
170 The following operand is supported:
172 .ne 2
174 \fB\fIinput\fR\fR
176 .RS 9n
177 Input to be verified against format criteria.
180 .SH EXIT STATUS
183 The following exit values are returned:
185 .ne 2
187 \fB\fB0\fR\fR
189 .RS 5n
190 Successful execution.
194 .ne 2
196 \fB\fB1\fR\fR
198 .RS 5n
199 \fBEOF\fR on input, or negative width on  \fB-W\fR option,  or usage error .
203 .ne 2
205 \fB\fB3\fR\fR
207 .RS 5n
208 User termination (quit) .
212 .ne 2
214 \fB\fB4\fR\fR
216 .RS 5n
217 Garbled format argument.
220 .SH SEE ALSO
223 \fBattributes\fR(5)
224 .SH NOTES
227 The default prompt for \fBcktime\fR is:
229 .in +2
231 Enter a time of day [?,q]:
233 .in -2
238 The default error message is:
240 .in +2
242 ERROR: Please enter the time of day.  Format is <format>.
244 .in -2
249 The default help message is:
251 .in +2
253 Please enter the time of day.  Format is <format>.
255 .in -2
260 When the quit option is chosen (and allowed), \fBq\fR is returned along with
261 the return code \fB3\fR. The \fBvaltime\fR module will not produce any output.
262 It returns  \fB0\fR for success and non-zero for failure.