8815 mega_sas: variable set but not used
[unleashed.git] / usr / src / man / man1 / ckyorn.1
blobec471294d79b5f7ceaed2a7e064d98b14768bffa
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 CKYORN 1 "Sep 14, 1992"
7 .SH NAME
8 ckyorn, erryorn, helpyorn, valyorn \- prompts for and validates yes/no
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fBckyorn\fR [\fB-Q\fR] [\fB-W\fR \fIwidth\fR] [\fB-d\fR \fIdefault\fR] [\fB-h\fR \fIhelp\fR] [\fB-e\fR \fIerror\fR]
13      [\fB-p\fR \fIprompt\fR] [\fB-k\fR \fIpid\fR [\fB-s\fR \fIsignal\fR]]
14 .fi
16 .LP
17 .nf
18 \fB/usr/sadm/bin/erryorn\fR [\fB-W\fR \fIwidth\fR] [\fB-e\fR \fIerror\fR]
19 .fi
21 .LP
22 .nf
23 \fB/usr/sadm/bin/helpyorn\fR [\fB-W\fR \fIwidth\fR] [\fB-h\fR \fIhelp\fR]
24 .fi
26 .LP
27 .nf
28 \fB/usr/sadm/bin/valyorn\fR \fIinput\fR
29 .fi
31 .SH DESCRIPTION
32 .sp
33 .LP
34 \fBckyorn\fR prompts a user and validates the response. It defines, among other
35 things, a prompt message for a yes or no answer, text for help and error
36 messages, and a default value (which is returned if the user responds with a
37 RETURN).
38 .sp
39 .LP
40 All messages are limited in length to 70 characters and are formatted
41 automatically. Any white space used in the definition (including newline) is
42 stripped. The \fB-W\fR option cancels the automatic formatting. When a tilde is
43 placed at the beginning or end of a message definition, the default text is
44 inserted at that point, allowing both custom text and the default text to be
45 displayed.
46 .sp
47 .LP
48 If the prompt, help or error message is not defined, the default message (as
49 defined under \fBNOTES\fR) is displayed.
50 .sp
51 .LP
52 Three visual tool modules are linked to the \fBckyorn\fR command. They are
53 \fBerryorn\fR (which formats and displays an error message), \fBhelpyorn\fR
54 (which formats and displays a help message), and \fBvalyorn\fR (which validates
55 a response). These modules should be used in conjunction with  \fBFACE\fR
56 objects. In this instance, the  \fBFACE\fR object defines the prompt.
57 .SH OPTIONS
58 .sp
59 .LP
60 The following options are supported:
61 .sp
62 .ne 2
63 .na
64 \fB\fB-d\fR\fI default\fR\fR
65 .ad
66 .RS 14n
67 Defines the default value as \fIdefault\fR. The default is not validated and so
68 does not have to meet any criteria.
69 .RE
71 .sp
72 .ne 2
73 .na
74 \fB\fB-e\fR \fIerror\fR\fR
75 .ad
76 .RS 14n
77 Defines the error message as \fIerror\fR.
78 .RE
80 .sp
81 .ne 2
82 .na
83 \fB\fB-h\fR \fIhelp\fR\fR
84 .ad
85 .RS 14n
86 Defines the help messages as \fIhelp\fR.
87 .RE
89 .sp
90 .ne 2
91 .na
92 \fB\fB-k\fR\fI pid\fR\fR
93 .ad
94 .RS 14n
95 Specifies that process \fBID\fR \fIpid\fR is to be sent a signal if the user
96 chooses to abort.
97 .RE
99 .sp
100 .ne 2
102 \fB\fB-p\fR\fI prompt\fR\fR
104 .RS 14n
105 Defines the prompt message as \fIprompt\fR.
109 .ne 2
111 \fB\fB-Q\fR\fR
113 .RS 14n
114 Specifies that quit will not be allowed as a valid response.
118 .ne 2
120 \fB\fB-s\fR \fIsignal\fR\fR
122 .RS 14n
123 Specifies that the process \fBID\fR \fIpid\fR defined with the \fB-k\fR option
124 is to be sent signal \fIsignal\fR when quit is chosen. If no signal is
125 specified, \fBSIGTERM\fR is used.
129 .ne 2
131 \fB\fB-W\fR\fI width\fR\fR
133 .RS 14n
134 Specifies that prompt, help and error messages will be formatted to a line
135 length of \fIwidth\fR.
138 .SH OPERANDS
141 The following operand is supported:
143 .ne 2
145 \fB\fIinput\fR\fR
147 .RS 9n
148 Input to be verified as \fBy\fR, \fByes\fR, or \fBn\fR, \fBno\fR (in any
149 combination of upper- and lower-case letters).
152 .SH EXIT STATUS
155 The following exit values are returned:
157 .ne 2
159 \fB\fB0\fR\fR
161 .RS 5n
162 Successful execution.
166 .ne 2
168 \fB\fB1\fR\fR
170 .RS 5n
171 \fBEOF\fR on input, or negative width on  \fB-W\fR option,  or usage error.
175 .ne 2
177 \fB\fB2\fR\fR
179 .RS 5n
180 Usage error.
184 .ne 2
186 \fB\fB3\fR\fR
188 .RS 5n
189 User termination (quit).
192 .SH SEE ALSO
195 \fBattributes\fR(5)
196 .SH NOTES
199 The default prompt for \fBckyorn\fR is:
201 .in +2
203 Yes or No [y,n,?,q]:
205 .in -2
210 The default error message is:
212 .in +2
214 ERROR - Please enter yes or no.
216 .in -2
221 The default help message is:
223 .in +2
225 To respond in the affirmative, enter y, yes, Y, or YES.
226 To respond in the negative, enter n, no, N, or NO.
228 .in -2
233 When the quit option is chosen (and allowed), \fBq\fR is returned along with
234 the return code \fB3\fR. The \fBvalyorn\fR module will not produce any output.
235 It returns  \fB0\fR for success and non-zero for failure.