5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
28 cat >console-login.xml
<<EOF
31 Copyright 2008 Sun Microsystems, Inc. All rights reserved.
32 Use is subject to license terms.
34 NOTE: This service manifest is not editable; its contents will
35 be overwritten by package or patch operations, including
36 operating system upgrade. Make customizations in a different
40 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
42 <service_bundle type='manifest' name='SUNWcsr:console'>
45 name='system/console-login'
51 grouping='require_all'
54 <service_fmri value='svc:/system/filesystem/minimal' />
59 grouping='require_all'
62 <service_fmri value='svc:/system/identity:node' />
67 grouping='require_all'
70 <service_fmri value='svc:/system/utmp:default' />
73 <!-- Note that console-login should be dependent on any services
74 that may need to use the console. This requirement can be met
75 by establishing a dependency on milestone/sysconfig which,
76 among other things, collects such dependencies.
80 grouping='require_all'
83 <service_fmri value='svc:/milestone/sysconfig' />
89 exec='/lib/svc/method/console-login %i'
92 <method_credential user='root' group='root' />
102 <method_credential user='root' group='root' />
107 <property_group name='startd' type='framework'>
108 <propval name='duration' type='astring' value='child' />
109 <propval name='ignore_error' type='astring'
110 value='core,signal' />
111 <propval name='utmpx_prefix' type='astring' value='co' />
114 <property_group name='general' type='framework'>
115 <propval name='action_authorization' type='astring'
116 value='solaris.smf.manage.vt' />
117 <propval name='value_authorization' type='astring'
118 value='solaris.smf.manage.vt' />
121 <!-- these are passed to ttymon in the method script.
122 note that value_authorization is not passed to ttymon
123 and it's for smf_security(5).
125 <property_group name='ttymon' type='application'>
126 <propval name='value_authorization' type='astring'
127 value='solaris.smf.value.vt' />
128 <propval name='device' type='astring' value='/dev/console' />
129 <propval name='label' type='astring' value='console' />
130 <propval name='timeout' type='count' value='0' />
131 <propval name='nohangup' type='boolean' value='true' />
132 <propval name='modules' type='astring'
133 value='ldterm,ttcompat' />
134 <propval name='prompt' type='astring'
135 value='\`uname -n\` console login:' />
136 <propval name='terminal_type' type='astring'
141 <instance name='default' enabled='true'>
146 # Note that this script file is normally parsed during build by sh(1).
147 # When the parser encounters an EOF token (like the one above), it
148 # will fork off and pipe all the text after the EOF above to the shell
151 # one system console (/dev/console) plus five virtual consoles
152 # (/dev/vt/#, # is from 2 to 6).
154 for num
in 2 3 4 5 6; do
155 cat >>console-login.xml
<<EOF
157 <instance name='vt$num' enabled='false'>
160 name='system-console'
161 grouping='require_all'
164 <service_fmri value='svc:/system/console-login:default' />
169 grouping='require_all'
172 <service_fmri value='svc:/system/vtdaemon:default' />
175 <!-- these are passed to ttymon in the method script -->
176 <property_group name='ttymon' type='application'>
177 <propval name='value_authorization' type='astring'
178 value='solaris.smf.value.vt' />
179 <propval name='device' type='astring' value='/dev/vt/$num' />
180 <propval name='label' type='astring' value='console' />
181 <propval name='timeout' type='count' value='0' />
182 <propval name='nohangup' type='boolean' value='true' />
183 <propval name='modules' type='astring'
184 value='ldterm,ttcompat' />
185 <propval name='prompt' type='astring'
186 value='\`uname -n\` vt$num login:' />
187 <propval name='terminal_type' type='astring'
196 cat >>console-login.xml
<<EOF
198 <stability value='Evolving' />
202 <loctext xml:lang='C'>
207 <manpage title='ttymon' section='1M'
208 manpath='/usr/share/man' />
211 <pg_pattern name='ttymon' type='application' target='this'
213 <prop_pattern name='device' type='astring'
216 <loctext xml:lang='C'>
217 The terminal device to be used for the console login prompt.
220 <visibility value='readwrite'/>
221 <cardinality min='1' max='1'/>
223 <value name='/dev/console'>
225 <loctext xml:lang='C'>
226 The default console device
230 <value name='/dev/wscons'>
232 <loctext xml:lang='C'>
233 The physical workstation console (i.e. keyboard and monitor)
237 <value name='/dev/term/a'>
239 <loctext xml:lang='C'>
244 <value name='/dev/term/b'>
246 <loctext xml:lang='C'>
253 <include_values type='values'/>
256 <prop_pattern name='label' type='astring'
259 <loctext xml:lang='C'>
264 <loctext xml:lang='C'>
265 The appropriate entry from /etc/ttydefs
268 <visibility value='readwrite'/>
269 <cardinality min='1' max='1'/>
271 <prop_pattern name='timeout' type='count'
274 <loctext xml:lang='C'>
275 If no user input is given within the number of seconds defined by this property after the prompt is printed, ttymon should exit.
279 <loctext xml:lang='C'>
283 <visibility value='readwrite'/>
284 <cardinality min='1' max='1'/>
286 <prop_pattern name='nohangup' type='boolean'
289 <loctext xml:lang='C'>
290 Do not force a hangup on the line by setting the speed to zero before setting the speed to the default or specified speed.
293 <visibility value='readwrite'/>
294 <cardinality min='1' max='1'/>
296 <prop_pattern name='modules' type='astring'
299 <loctext xml:lang='C'>
304 <loctext xml:lang='C'>
305 STREAMS modules to be pushed on the terminal
308 <visibility value='readwrite'/>
309 <internal_separators>,</internal_separators>
311 <prop_pattern name='prompt' type='astring'
314 <loctext xml:lang='C'>
315 Prompt to be printed on console
318 <visibility value='readwrite'/>
319 <cardinality min='1' max='1'/>
321 <prop_pattern name='terminal_type' type='astring'
324 <loctext xml:lang='C'>
325 Sets the initial value of the TERM environment variable
328 <visibility value='readwrite'/>
329 <cardinality min='1' max='1'/>