10Sstevel@tonic-gate#!/sbin/sh 20Sstevel@tonic-gate# 30Sstevel@tonic-gate# CDDL HEADER START 40Sstevel@tonic-gate# 50Sstevel@tonic-gate# The contents of this file are subject to the terms of the 61253Slq150181# Common Development and Distribution License (the "License"). 71253Slq150181# You may not use this file except in compliance with the License. 80Sstevel@tonic-gate# 90Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 100Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 110Sstevel@tonic-gate# See the License for the specific language governing permissions 120Sstevel@tonic-gate# and limitations under the License. 130Sstevel@tonic-gate# 140Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 150Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 160Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 170Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 180Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 190Sstevel@tonic-gate# 200Sstevel@tonic-gate# CDDL HEADER END 210Sstevel@tonic-gate# 221253Slq150181 230Sstevel@tonic-gate# 247688SAaron.Zang@Sun.COM# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 250Sstevel@tonic-gate# Use is subject to license terms. 260Sstevel@tonic-gate# 270Sstevel@tonic-gate 280Sstevel@tonic-gatecat >console-login.xml <<EOF 290Sstevel@tonic-gate<?xml version="1.0"?> 300Sstevel@tonic-gate<!-- 31*7887SLiane.Praza@Sun.COM Copyright 2008 Sun Microsystems, Inc. All rights reserved. 320Sstevel@tonic-gate Use is subject to license terms. 330Sstevel@tonic-gate 340Sstevel@tonic-gate NOTE: This service manifest is not editable; its contents will 350Sstevel@tonic-gate be overwritten by package or patch operations, including 360Sstevel@tonic-gate operating system upgrade. Make customizations in a different 370Sstevel@tonic-gate file. 380Sstevel@tonic-gate--> 390Sstevel@tonic-gate 400Sstevel@tonic-gate<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> 410Sstevel@tonic-gate 420Sstevel@tonic-gate<service_bundle type='manifest' name='SUNWcsr:console'> 430Sstevel@tonic-gate 440Sstevel@tonic-gate<service 450Sstevel@tonic-gate name='system/console-login' 460Sstevel@tonic-gate type='service' 470Sstevel@tonic-gate version='1'> 480Sstevel@tonic-gate 490Sstevel@tonic-gate <dependency 500Sstevel@tonic-gate name='fs' 510Sstevel@tonic-gate grouping='require_all' 520Sstevel@tonic-gate restart_on='none' 530Sstevel@tonic-gate type='service'> 540Sstevel@tonic-gate <service_fmri value='svc:/system/filesystem/minimal' /> 550Sstevel@tonic-gate </dependency> 560Sstevel@tonic-gate 570Sstevel@tonic-gate <dependency 580Sstevel@tonic-gate name='identity' 590Sstevel@tonic-gate grouping='require_all' 600Sstevel@tonic-gate restart_on='none' 610Sstevel@tonic-gate type='service'> 620Sstevel@tonic-gate <service_fmri value='svc:/system/identity:node' /> 630Sstevel@tonic-gate </dependency> 640Sstevel@tonic-gate 650Sstevel@tonic-gate <dependency 660Sstevel@tonic-gate name='utmpx' 670Sstevel@tonic-gate grouping='require_all' 680Sstevel@tonic-gate restart_on='none' 690Sstevel@tonic-gate type='service'> 700Sstevel@tonic-gate <service_fmri value='svc:/system/utmp:default' /> 710Sstevel@tonic-gate </dependency> 720Sstevel@tonic-gate 730Sstevel@tonic-gate <!-- Note that console-login should be dependent on any services 740Sstevel@tonic-gate that may need to use the console. This requirement can be met 750Sstevel@tonic-gate by establishing a dependency on milestone/sysconfig which, 760Sstevel@tonic-gate among other things, collects such dependencies. 770Sstevel@tonic-gate --> 780Sstevel@tonic-gate <dependency 790Sstevel@tonic-gate name='sysconfig' 800Sstevel@tonic-gate grouping='require_all' 810Sstevel@tonic-gate restart_on='none' 820Sstevel@tonic-gate type='service'> 830Sstevel@tonic-gate <service_fmri value='svc:/milestone/sysconfig' /> 840Sstevel@tonic-gate </dependency> 850Sstevel@tonic-gate 860Sstevel@tonic-gate <exec_method 870Sstevel@tonic-gate type='method' 880Sstevel@tonic-gate name='start' 897688SAaron.Zang@Sun.COM exec='/lib/svc/method/console-login %i' 907688SAaron.Zang@Sun.COM timeout_seconds='0'> 917688SAaron.Zang@Sun.COM <method_context> 927688SAaron.Zang@Sun.COM <method_credential user='root' group='root' /> 937688SAaron.Zang@Sun.COM </method_context> 947688SAaron.Zang@Sun.COM </exec_method> 950Sstevel@tonic-gate 960Sstevel@tonic-gate <exec_method 970Sstevel@tonic-gate type='method' 980Sstevel@tonic-gate name='stop' 990Sstevel@tonic-gate exec=':kill -9' 1007688SAaron.Zang@Sun.COM timeout_seconds='3'> 1017688SAaron.Zang@Sun.COM <method_context> 1027688SAaron.Zang@Sun.COM <method_credential user='root' group='root' /> 1037688SAaron.Zang@Sun.COM </method_context> 1047688SAaron.Zang@Sun.COM </exec_method> 1057688SAaron.Zang@Sun.COM 1060Sstevel@tonic-gate 1070Sstevel@tonic-gate <property_group name='startd' type='framework'> 1080Sstevel@tonic-gate <propval name='duration' type='astring' value='child' /> 1090Sstevel@tonic-gate <propval name='ignore_error' type='astring' 1100Sstevel@tonic-gate value='core,signal' /> 1110Sstevel@tonic-gate <propval name='utmpx_prefix' type='astring' value='co' /> 1120Sstevel@tonic-gate </property_group> 1130Sstevel@tonic-gate 1147688SAaron.Zang@Sun.COM <property_group name='general' type='framework'> 1157688SAaron.Zang@Sun.COM <propval name='action_authorization' type='astring' 1167688SAaron.Zang@Sun.COM value='solaris.smf.manage.vt' /> 1177688SAaron.Zang@Sun.COM <propval name='value_authorization' type='astring' 1187688SAaron.Zang@Sun.COM value='solaris.smf.manage.vt' /> 1197688SAaron.Zang@Sun.COM </property_group> 1207688SAaron.Zang@Sun.COM 1217688SAaron.Zang@Sun.COM <!-- these are passed to ttymon in the method script. 1227688SAaron.Zang@Sun.COM note that value_authorization is not passed to ttymon 1237688SAaron.Zang@Sun.COM and it's for smf_security(5). 1247688SAaron.Zang@Sun.COM --> 1250Sstevel@tonic-gate <property_group name='ttymon' type='application'> 1267688SAaron.Zang@Sun.COM <propval name='value_authorization' type='astring' 1277688SAaron.Zang@Sun.COM value='solaris.smf.value.vt' /> 1280Sstevel@tonic-gate <propval name='device' type='astring' value='/dev/console' /> 1290Sstevel@tonic-gate <propval name='label' type='astring' value='console' /> 1300Sstevel@tonic-gate <propval name='timeout' type='count' value='0' /> 1310Sstevel@tonic-gate <propval name='nohangup' type='boolean' value='true' /> 1320Sstevel@tonic-gate <propval name='modules' type='astring' 1330Sstevel@tonic-gate value='ldterm,ttcompat' /> 1340Sstevel@tonic-gate <propval name='prompt' type='astring' 1350Sstevel@tonic-gate value='\`uname -n\` console login:' /> 1360Sstevel@tonic-gate <propval name='terminal_type' type='astring' 1371253Slq150181 value='' /> 1380Sstevel@tonic-gate </property_group> 1390Sstevel@tonic-gate 1407688SAaron.Zang@Sun.COM 1417688SAaron.Zang@Sun.COM<instance name='default' enabled='true'> 1427688SAaron.Zang@Sun.COM</instance> 1437688SAaron.Zang@Sun.COM 1447688SAaron.Zang@Sun.COMEOF 1457688SAaron.Zang@Sun.COM 1467688SAaron.Zang@Sun.COM# Note that this script file is normally parsed during build by sh(1). 1477688SAaron.Zang@Sun.COM# When the parser encounters an EOF token (like the one above), it 1487688SAaron.Zang@Sun.COM# will fork off and pipe all the text after the EOF above to the shell 1497688SAaron.Zang@Sun.COM# for execution. 1507688SAaron.Zang@Sun.COM# 1517688SAaron.Zang@Sun.COM# one system console (/dev/console) plus five virtual consoles 1527688SAaron.Zang@Sun.COM# (/dev/vt/#, # is from 2 to 6). 1537688SAaron.Zang@Sun.COM 1547688SAaron.Zang@Sun.COMfor num in 2 3 4 5 6; do 1557688SAaron.Zang@Sun.COM cat >>console-login.xml <<EOF 1567688SAaron.Zang@Sun.COM 1577688SAaron.Zang@Sun.COM<instance name='vt$num' enabled='false'> 1587688SAaron.Zang@Sun.COM 1597688SAaron.Zang@Sun.COM <dependency 1607688SAaron.Zang@Sun.COM name='system-console' 1617688SAaron.Zang@Sun.COM grouping='require_all' 1627688SAaron.Zang@Sun.COM restart_on='none' 1637688SAaron.Zang@Sun.COM type='service'> 1647688SAaron.Zang@Sun.COM <service_fmri value='svc:/system/console-login:default' /> 1657688SAaron.Zang@Sun.COM </dependency> 1667688SAaron.Zang@Sun.COM 1677688SAaron.Zang@Sun.COM <dependency 1687688SAaron.Zang@Sun.COM name='vtdaemon' 1697688SAaron.Zang@Sun.COM grouping='require_all' 1707688SAaron.Zang@Sun.COM restart_on='none' 1717688SAaron.Zang@Sun.COM type='service'> 1727688SAaron.Zang@Sun.COM <service_fmri value='svc:/system/vtdaemon:default' /> 1737688SAaron.Zang@Sun.COM </dependency> 1747688SAaron.Zang@Sun.COM 1757688SAaron.Zang@Sun.COM <!-- these are passed to ttymon in the method script --> 1767688SAaron.Zang@Sun.COM <property_group name='ttymon' type='application'> 1777688SAaron.Zang@Sun.COM <propval name='value_authorization' type='astring' 1787688SAaron.Zang@Sun.COM value='solaris.smf.value.vt' /> 1797688SAaron.Zang@Sun.COM <propval name='device' type='astring' value='/dev/vt/$num' /> 1807688SAaron.Zang@Sun.COM <propval name='label' type='astring' value='console' /> 1817688SAaron.Zang@Sun.COM <propval name='timeout' type='count' value='0' /> 1827688SAaron.Zang@Sun.COM <propval name='nohangup' type='boolean' value='true' /> 1837688SAaron.Zang@Sun.COM <propval name='modules' type='astring' 1847688SAaron.Zang@Sun.COM value='ldterm,ttcompat' /> 1857688SAaron.Zang@Sun.COM <propval name='prompt' type='astring' 1867688SAaron.Zang@Sun.COM value='\`uname -n\` vt$num login:' /> 1877688SAaron.Zang@Sun.COM <propval name='terminal_type' type='astring' 1887688SAaron.Zang@Sun.COM value='' /> 1897688SAaron.Zang@Sun.COM </property_group> 1907688SAaron.Zang@Sun.COM 1917688SAaron.Zang@Sun.COM</instance> 1927688SAaron.Zang@Sun.COM 1937688SAaron.Zang@Sun.COMEOF 1947688SAaron.Zang@Sun.COMdone 1957688SAaron.Zang@Sun.COM 1967688SAaron.Zang@Sun.COMcat >>console-login.xml <<EOF 1977688SAaron.Zang@Sun.COM 1980Sstevel@tonic-gate <stability value='Evolving' /> 1990Sstevel@tonic-gate 2000Sstevel@tonic-gate <template> 2010Sstevel@tonic-gate <common_name> 2020Sstevel@tonic-gate <loctext xml:lang='C'> 2030Sstevel@tonic-gateConsole login 2040Sstevel@tonic-gate </loctext> 2050Sstevel@tonic-gate </common_name> 2060Sstevel@tonic-gate <documentation> 2070Sstevel@tonic-gate <manpage title='ttymon' section='1M' 2080Sstevel@tonic-gate manpath='/usr/share/man' /> 2090Sstevel@tonic-gate </documentation> 210*7887SLiane.Praza@Sun.COM 211*7887SLiane.Praza@Sun.COM <pg_pattern name='ttymon' type='application' target='this' 212*7887SLiane.Praza@Sun.COM required='false'> 213*7887SLiane.Praza@Sun.COM <prop_pattern name='device' type='astring' 214*7887SLiane.Praza@Sun.COM required='false'> 215*7887SLiane.Praza@Sun.COM <description> 216*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 217*7887SLiane.Praza@Sun.COMThe terminal device to be used for the console login prompt. 218*7887SLiane.Praza@Sun.COM </loctext> 219*7887SLiane.Praza@Sun.COM </description> 220*7887SLiane.Praza@Sun.COM <visibility value='readwrite'/> 221*7887SLiane.Praza@Sun.COM <cardinality min='1' max='1'/> 222*7887SLiane.Praza@Sun.COM <values> 223*7887SLiane.Praza@Sun.COM <value name='/dev/console'> 224*7887SLiane.Praza@Sun.COM <description> 225*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 226*7887SLiane.Praza@Sun.COMThe default console device 227*7887SLiane.Praza@Sun.COM </loctext> 228*7887SLiane.Praza@Sun.COM </description> 229*7887SLiane.Praza@Sun.COM </value> 230*7887SLiane.Praza@Sun.COM <value name='/dev/wscons'> 231*7887SLiane.Praza@Sun.COM <description> 232*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 233*7887SLiane.Praza@Sun.COMThe physical workstation console (i.e. keyboard and monitor) 234*7887SLiane.Praza@Sun.COM </loctext> 235*7887SLiane.Praza@Sun.COM </description> 236*7887SLiane.Praza@Sun.COM </value> 237*7887SLiane.Praza@Sun.COM <value name='/dev/term/a'> 238*7887SLiane.Praza@Sun.COM <description> 239*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 240*7887SLiane.Praza@Sun.COMSerial device A 241*7887SLiane.Praza@Sun.COM </loctext> 242*7887SLiane.Praza@Sun.COM </description> 243*7887SLiane.Praza@Sun.COM </value> 244*7887SLiane.Praza@Sun.COM <value name='/dev/term/b'> 245*7887SLiane.Praza@Sun.COM <description> 246*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 247*7887SLiane.Praza@Sun.COMSerial device B 248*7887SLiane.Praza@Sun.COM </loctext> 249*7887SLiane.Praza@Sun.COM </description> 250*7887SLiane.Praza@Sun.COM </value> 251*7887SLiane.Praza@Sun.COM </values> 252*7887SLiane.Praza@Sun.COM <choices> 253*7887SLiane.Praza@Sun.COM <include_values type='values'/> 254*7887SLiane.Praza@Sun.COM </choices> 255*7887SLiane.Praza@Sun.COM </prop_pattern> 256*7887SLiane.Praza@Sun.COM <prop_pattern name='label' type='astring' 257*7887SLiane.Praza@Sun.COM required='false'> 258*7887SLiane.Praza@Sun.COM <common_name> 259*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 260*7887SLiane.Praza@Sun.COM/etc/ttydefs entry 261*7887SLiane.Praza@Sun.COM </loctext> 262*7887SLiane.Praza@Sun.COM </common_name> 263*7887SLiane.Praza@Sun.COM <description> 264*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 265*7887SLiane.Praza@Sun.COMThe appropriate entry from /etc/ttydefs 266*7887SLiane.Praza@Sun.COM </loctext> 267*7887SLiane.Praza@Sun.COM </description> 268*7887SLiane.Praza@Sun.COM <visibility value='readwrite'/> 269*7887SLiane.Praza@Sun.COM <cardinality min='1' max='1'/> 270*7887SLiane.Praza@Sun.COM </prop_pattern> 271*7887SLiane.Praza@Sun.COM <prop_pattern name='timeout' type='count' 272*7887SLiane.Praza@Sun.COM required='false'> 273*7887SLiane.Praza@Sun.COM <description> 274*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 275*7887SLiane.Praza@Sun.COMIf no user input is given within the number of seconds defined by this property after the prompt is printed, ttymon should exit. 276*7887SLiane.Praza@Sun.COM </loctext> 277*7887SLiane.Praza@Sun.COM </description> 278*7887SLiane.Praza@Sun.COM <units> 279*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 280*7887SLiane.Praza@Sun.COMseconds 281*7887SLiane.Praza@Sun.COM </loctext> 282*7887SLiane.Praza@Sun.COM </units> 283*7887SLiane.Praza@Sun.COM <visibility value='readwrite'/> 284*7887SLiane.Praza@Sun.COM <cardinality min='1' max='1'/> 285*7887SLiane.Praza@Sun.COM </prop_pattern> 286*7887SLiane.Praza@Sun.COM <prop_pattern name='nohangup' type='boolean' 287*7887SLiane.Praza@Sun.COM required='false'> 288*7887SLiane.Praza@Sun.COM <description> 289*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 290*7887SLiane.Praza@Sun.COMDo not force a hangup on the line by setting the speed to zero before setting the speed to the default or specified speed. 291*7887SLiane.Praza@Sun.COM </loctext> 292*7887SLiane.Praza@Sun.COM </description> 293*7887SLiane.Praza@Sun.COM <visibility value='readwrite'/> 294*7887SLiane.Praza@Sun.COM <cardinality min='1' max='1'/> 295*7887SLiane.Praza@Sun.COM </prop_pattern> 296*7887SLiane.Praza@Sun.COM <prop_pattern name='modules' type='astring' 297*7887SLiane.Praza@Sun.COM required='false'> 298*7887SLiane.Praza@Sun.COM <common_name> 299*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 300*7887SLiane.Praza@Sun.COMSTREAMS modules 301*7887SLiane.Praza@Sun.COM </loctext> 302*7887SLiane.Praza@Sun.COM </common_name> 303*7887SLiane.Praza@Sun.COM <description> 304*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 305*7887SLiane.Praza@Sun.COMSTREAMS modules to be pushed on the terminal 306*7887SLiane.Praza@Sun.COM </loctext> 307*7887SLiane.Praza@Sun.COM </description> 308*7887SLiane.Praza@Sun.COM <visibility value='readwrite'/> 309*7887SLiane.Praza@Sun.COM <internal_separators>,</internal_separators> 310*7887SLiane.Praza@Sun.COM </prop_pattern> 311*7887SLiane.Praza@Sun.COM <prop_pattern name='prompt' type='astring' 312*7887SLiane.Praza@Sun.COM required='false'> 313*7887SLiane.Praza@Sun.COM <description> 314*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 315*7887SLiane.Praza@Sun.COMPrompt to be printed on console 316*7887SLiane.Praza@Sun.COM </loctext> 317*7887SLiane.Praza@Sun.COM </description> 318*7887SLiane.Praza@Sun.COM <visibility value='readwrite'/> 319*7887SLiane.Praza@Sun.COM <cardinality min='1' max='1'/> 320*7887SLiane.Praza@Sun.COM </prop_pattern> 321*7887SLiane.Praza@Sun.COM <prop_pattern name='terminal_type' type='astring' 322*7887SLiane.Praza@Sun.COM required='false'> 323*7887SLiane.Praza@Sun.COM <description> 324*7887SLiane.Praza@Sun.COM <loctext xml:lang='C'> 325*7887SLiane.Praza@Sun.COMSets the initial value of the TERM environment variable 326*7887SLiane.Praza@Sun.COM </loctext> 327*7887SLiane.Praza@Sun.COM </description> 328*7887SLiane.Praza@Sun.COM <visibility value='readwrite'/> 329*7887SLiane.Praza@Sun.COM <cardinality min='1' max='1'/> 330*7887SLiane.Praza@Sun.COM </prop_pattern> 331*7887SLiane.Praza@Sun.COM </pg_pattern> 332*7887SLiane.Praza@Sun.COM 3330Sstevel@tonic-gate </template> 3340Sstevel@tonic-gate</service> 3350Sstevel@tonic-gate 3360Sstevel@tonic-gate</service_bundle> 3370Sstevel@tonic-gateEOF 338