17c478bd9Sstevel@tonic-gate#!/sbin/sh 27c478bd9Sstevel@tonic-gate# 37c478bd9Sstevel@tonic-gate# CDDL HEADER START 47c478bd9Sstevel@tonic-gate# 57c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 6fea9cb91Slq150181# Common Development and Distribution License (the "License"). 7fea9cb91Slq150181# You may not use this file except in compliance with the License. 87c478bd9Sstevel@tonic-gate# 97c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 107c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 117c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 127c478bd9Sstevel@tonic-gate# and limitations under the License. 137c478bd9Sstevel@tonic-gate# 147c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 157c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 167c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 177c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 187c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 197c478bd9Sstevel@tonic-gate# 207c478bd9Sstevel@tonic-gate# CDDL HEADER END 217c478bd9Sstevel@tonic-gate# 22fea9cb91Slq150181 237c478bd9Sstevel@tonic-gate# 24aecfc01dSrui zang - Sun Microsystems - Beijing China# Copyright 2008 Sun Microsystems, Inc. All rights reserved. 257c478bd9Sstevel@tonic-gate# Use is subject to license terms. 267c478bd9Sstevel@tonic-gate# 277c478bd9Sstevel@tonic-gate 287c478bd9Sstevel@tonic-gatecat >console-login.xml <<EOF 297c478bd9Sstevel@tonic-gate<?xml version="1.0"?> 307c478bd9Sstevel@tonic-gate<!-- 31*1f6eb021SLiane Praza Copyright 2008 Sun Microsystems, Inc. All rights reserved. 327c478bd9Sstevel@tonic-gate Use is subject to license terms. 337c478bd9Sstevel@tonic-gate 347c478bd9Sstevel@tonic-gate NOTE: This service manifest is not editable; its contents will 357c478bd9Sstevel@tonic-gate be overwritten by package or patch operations, including 367c478bd9Sstevel@tonic-gate operating system upgrade. Make customizations in a different 377c478bd9Sstevel@tonic-gate file. 387c478bd9Sstevel@tonic-gate--> 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate<service_bundle type='manifest' name='SUNWcsr:console'> 437c478bd9Sstevel@tonic-gate 447c478bd9Sstevel@tonic-gate<service 457c478bd9Sstevel@tonic-gate name='system/console-login' 467c478bd9Sstevel@tonic-gate type='service' 477c478bd9Sstevel@tonic-gate version='1'> 487c478bd9Sstevel@tonic-gate 497c478bd9Sstevel@tonic-gate <dependency 507c478bd9Sstevel@tonic-gate name='fs' 517c478bd9Sstevel@tonic-gate grouping='require_all' 527c478bd9Sstevel@tonic-gate restart_on='none' 537c478bd9Sstevel@tonic-gate type='service'> 547c478bd9Sstevel@tonic-gate <service_fmri value='svc:/system/filesystem/minimal' /> 557c478bd9Sstevel@tonic-gate </dependency> 567c478bd9Sstevel@tonic-gate 577c478bd9Sstevel@tonic-gate <dependency 587c478bd9Sstevel@tonic-gate name='identity' 597c478bd9Sstevel@tonic-gate grouping='require_all' 607c478bd9Sstevel@tonic-gate restart_on='none' 617c478bd9Sstevel@tonic-gate type='service'> 627c478bd9Sstevel@tonic-gate <service_fmri value='svc:/system/identity:node' /> 637c478bd9Sstevel@tonic-gate </dependency> 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate <dependency 667c478bd9Sstevel@tonic-gate name='utmpx' 677c478bd9Sstevel@tonic-gate grouping='require_all' 687c478bd9Sstevel@tonic-gate restart_on='none' 697c478bd9Sstevel@tonic-gate type='service'> 707c478bd9Sstevel@tonic-gate <service_fmri value='svc:/system/utmp:default' /> 717c478bd9Sstevel@tonic-gate </dependency> 727c478bd9Sstevel@tonic-gate 737c478bd9Sstevel@tonic-gate <!-- Note that console-login should be dependent on any services 747c478bd9Sstevel@tonic-gate that may need to use the console. This requirement can be met 757c478bd9Sstevel@tonic-gate by establishing a dependency on milestone/sysconfig which, 767c478bd9Sstevel@tonic-gate among other things, collects such dependencies. 777c478bd9Sstevel@tonic-gate --> 787c478bd9Sstevel@tonic-gate <dependency 797c478bd9Sstevel@tonic-gate name='sysconfig' 807c478bd9Sstevel@tonic-gate grouping='require_all' 817c478bd9Sstevel@tonic-gate restart_on='none' 827c478bd9Sstevel@tonic-gate type='service'> 837c478bd9Sstevel@tonic-gate <service_fmri value='svc:/milestone/sysconfig' /> 847c478bd9Sstevel@tonic-gate </dependency> 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gate <exec_method 877c478bd9Sstevel@tonic-gate type='method' 887c478bd9Sstevel@tonic-gate name='start' 89aecfc01dSrui zang - Sun Microsystems - Beijing China exec='/lib/svc/method/console-login %i' 90aecfc01dSrui zang - Sun Microsystems - Beijing China timeout_seconds='0'> 91aecfc01dSrui zang - Sun Microsystems - Beijing China <method_context> 92aecfc01dSrui zang - Sun Microsystems - Beijing China <method_credential user='root' group='root' /> 93aecfc01dSrui zang - Sun Microsystems - Beijing China </method_context> 94aecfc01dSrui zang - Sun Microsystems - Beijing China </exec_method> 957c478bd9Sstevel@tonic-gate 967c478bd9Sstevel@tonic-gate <exec_method 977c478bd9Sstevel@tonic-gate type='method' 987c478bd9Sstevel@tonic-gate name='stop' 997c478bd9Sstevel@tonic-gate exec=':kill -9' 100aecfc01dSrui zang - Sun Microsystems - Beijing China timeout_seconds='3'> 101aecfc01dSrui zang - Sun Microsystems - Beijing China <method_context> 102aecfc01dSrui zang - Sun Microsystems - Beijing China <method_credential user='root' group='root' /> 103aecfc01dSrui zang - Sun Microsystems - Beijing China </method_context> 104aecfc01dSrui zang - Sun Microsystems - Beijing China </exec_method> 105aecfc01dSrui zang - Sun Microsystems - Beijing China 1067c478bd9Sstevel@tonic-gate 1077c478bd9Sstevel@tonic-gate <property_group name='startd' type='framework'> 1087c478bd9Sstevel@tonic-gate <propval name='duration' type='astring' value='child' /> 1097c478bd9Sstevel@tonic-gate <propval name='ignore_error' type='astring' 1107c478bd9Sstevel@tonic-gate value='core,signal' /> 1117c478bd9Sstevel@tonic-gate <propval name='utmpx_prefix' type='astring' value='co' /> 1127c478bd9Sstevel@tonic-gate </property_group> 1137c478bd9Sstevel@tonic-gate 114aecfc01dSrui zang - Sun Microsystems - Beijing China <property_group name='general' type='framework'> 115aecfc01dSrui zang - Sun Microsystems - Beijing China <propval name='action_authorization' type='astring' 116aecfc01dSrui zang - Sun Microsystems - Beijing China value='solaris.smf.manage.vt' /> 117aecfc01dSrui zang - Sun Microsystems - Beijing China <propval name='value_authorization' type='astring' 118aecfc01dSrui zang - Sun Microsystems - Beijing China value='solaris.smf.manage.vt' /> 119aecfc01dSrui zang - Sun Microsystems - Beijing China </property_group> 120aecfc01dSrui zang - Sun Microsystems - Beijing China 121aecfc01dSrui zang - Sun Microsystems - Beijing China <!-- these are passed to ttymon in the method script. 122aecfc01dSrui zang - Sun Microsystems - Beijing China note that value_authorization is not passed to ttymon 123aecfc01dSrui zang - Sun Microsystems - Beijing China and it's for smf_security(5). 124aecfc01dSrui zang - Sun Microsystems - Beijing China --> 1257c478bd9Sstevel@tonic-gate <property_group name='ttymon' type='application'> 126aecfc01dSrui zang - Sun Microsystems - Beijing China <propval name='value_authorization' type='astring' 127aecfc01dSrui zang - Sun Microsystems - Beijing China value='solaris.smf.value.vt' /> 1287c478bd9Sstevel@tonic-gate <propval name='device' type='astring' value='/dev/console' /> 1297c478bd9Sstevel@tonic-gate <propval name='label' type='astring' value='console' /> 1307c478bd9Sstevel@tonic-gate <propval name='timeout' type='count' value='0' /> 1317c478bd9Sstevel@tonic-gate <propval name='nohangup' type='boolean' value='true' /> 1327c478bd9Sstevel@tonic-gate <propval name='modules' type='astring' 1337c478bd9Sstevel@tonic-gate value='ldterm,ttcompat' /> 1347c478bd9Sstevel@tonic-gate <propval name='prompt' type='astring' 1357c478bd9Sstevel@tonic-gate value='\`uname -n\` console login:' /> 1367c478bd9Sstevel@tonic-gate <propval name='terminal_type' type='astring' 137fea9cb91Slq150181 value='' /> 1387c478bd9Sstevel@tonic-gate </property_group> 1397c478bd9Sstevel@tonic-gate 140aecfc01dSrui zang - Sun Microsystems - Beijing China 141aecfc01dSrui zang - Sun Microsystems - Beijing China<instance name='default' enabled='true'> 142aecfc01dSrui zang - Sun Microsystems - Beijing China</instance> 143aecfc01dSrui zang - Sun Microsystems - Beijing China 144aecfc01dSrui zang - Sun Microsystems - Beijing ChinaEOF 145aecfc01dSrui zang - Sun Microsystems - Beijing China 146aecfc01dSrui zang - Sun Microsystems - Beijing China# Note that this script file is normally parsed during build by sh(1). 147aecfc01dSrui zang - Sun Microsystems - Beijing China# When the parser encounters an EOF token (like the one above), it 148aecfc01dSrui zang - Sun Microsystems - Beijing China# will fork off and pipe all the text after the EOF above to the shell 149aecfc01dSrui zang - Sun Microsystems - Beijing China# for execution. 150aecfc01dSrui zang - Sun Microsystems - Beijing China# 151aecfc01dSrui zang - Sun Microsystems - Beijing China# one system console (/dev/console) plus five virtual consoles 152aecfc01dSrui zang - Sun Microsystems - Beijing China# (/dev/vt/#, # is from 2 to 6). 153aecfc01dSrui zang - Sun Microsystems - Beijing China 154aecfc01dSrui zang - Sun Microsystems - Beijing Chinafor num in 2 3 4 5 6; do 155aecfc01dSrui zang - Sun Microsystems - Beijing China cat >>console-login.xml <<EOF 156aecfc01dSrui zang - Sun Microsystems - Beijing China 157aecfc01dSrui zang - Sun Microsystems - Beijing China<instance name='vt$num' enabled='false'> 158aecfc01dSrui zang - Sun Microsystems - Beijing China 159aecfc01dSrui zang - Sun Microsystems - Beijing China <dependency 160aecfc01dSrui zang - Sun Microsystems - Beijing China name='system-console' 161aecfc01dSrui zang - Sun Microsystems - Beijing China grouping='require_all' 162aecfc01dSrui zang - Sun Microsystems - Beijing China restart_on='none' 163aecfc01dSrui zang - Sun Microsystems - Beijing China type='service'> 164aecfc01dSrui zang - Sun Microsystems - Beijing China <service_fmri value='svc:/system/console-login:default' /> 165aecfc01dSrui zang - Sun Microsystems - Beijing China </dependency> 166aecfc01dSrui zang - Sun Microsystems - Beijing China 167aecfc01dSrui zang - Sun Microsystems - Beijing China <dependency 168aecfc01dSrui zang - Sun Microsystems - Beijing China name='vtdaemon' 169aecfc01dSrui zang - Sun Microsystems - Beijing China grouping='require_all' 170aecfc01dSrui zang - Sun Microsystems - Beijing China restart_on='none' 171aecfc01dSrui zang - Sun Microsystems - Beijing China type='service'> 172aecfc01dSrui zang - Sun Microsystems - Beijing China <service_fmri value='svc:/system/vtdaemon:default' /> 173aecfc01dSrui zang - Sun Microsystems - Beijing China </dependency> 174aecfc01dSrui zang - Sun Microsystems - Beijing China 175aecfc01dSrui zang - Sun Microsystems - Beijing China <!-- these are passed to ttymon in the method script --> 176aecfc01dSrui zang - Sun Microsystems - Beijing China <property_group name='ttymon' type='application'> 177aecfc01dSrui zang - Sun Microsystems - Beijing China <propval name='value_authorization' type='astring' 178aecfc01dSrui zang - Sun Microsystems - Beijing China value='solaris.smf.value.vt' /> 179aecfc01dSrui zang - Sun Microsystems - Beijing China <propval name='device' type='astring' value='/dev/vt/$num' /> 180aecfc01dSrui zang - Sun Microsystems - Beijing China <propval name='label' type='astring' value='console' /> 181aecfc01dSrui zang - Sun Microsystems - Beijing China <propval name='timeout' type='count' value='0' /> 182aecfc01dSrui zang - Sun Microsystems - Beijing China <propval name='nohangup' type='boolean' value='true' /> 183aecfc01dSrui zang - Sun Microsystems - Beijing China <propval name='modules' type='astring' 184aecfc01dSrui zang - Sun Microsystems - Beijing China value='ldterm,ttcompat' /> 185aecfc01dSrui zang - Sun Microsystems - Beijing China <propval name='prompt' type='astring' 186aecfc01dSrui zang - Sun Microsystems - Beijing China value='\`uname -n\` vt$num login:' /> 187aecfc01dSrui zang - Sun Microsystems - Beijing China <propval name='terminal_type' type='astring' 188aecfc01dSrui zang - Sun Microsystems - Beijing China value='' /> 189aecfc01dSrui zang - Sun Microsystems - Beijing China </property_group> 190aecfc01dSrui zang - Sun Microsystems - Beijing China 191aecfc01dSrui zang - Sun Microsystems - Beijing China</instance> 192aecfc01dSrui zang - Sun Microsystems - Beijing China 193aecfc01dSrui zang - Sun Microsystems - Beijing ChinaEOF 194aecfc01dSrui zang - Sun Microsystems - Beijing Chinadone 195aecfc01dSrui zang - Sun Microsystems - Beijing China 196aecfc01dSrui zang - Sun Microsystems - Beijing Chinacat >>console-login.xml <<EOF 197aecfc01dSrui zang - Sun Microsystems - Beijing China 1987c478bd9Sstevel@tonic-gate <stability value='Evolving' /> 1997c478bd9Sstevel@tonic-gate 2007c478bd9Sstevel@tonic-gate <template> 2017c478bd9Sstevel@tonic-gate <common_name> 2027c478bd9Sstevel@tonic-gate <loctext xml:lang='C'> 2037c478bd9Sstevel@tonic-gateConsole login 2047c478bd9Sstevel@tonic-gate </loctext> 2057c478bd9Sstevel@tonic-gate </common_name> 2067c478bd9Sstevel@tonic-gate <documentation> 2077c478bd9Sstevel@tonic-gate <manpage title='ttymon' section='1M' 2087c478bd9Sstevel@tonic-gate manpath='/usr/share/man' /> 2097c478bd9Sstevel@tonic-gate </documentation> 210*1f6eb021SLiane Praza 211*1f6eb021SLiane Praza <pg_pattern name='ttymon' type='application' target='this' 212*1f6eb021SLiane Praza required='false'> 213*1f6eb021SLiane Praza <prop_pattern name='device' type='astring' 214*1f6eb021SLiane Praza required='false'> 215*1f6eb021SLiane Praza <description> 216*1f6eb021SLiane Praza <loctext xml:lang='C'> 217*1f6eb021SLiane PrazaThe terminal device to be used for the console login prompt. 218*1f6eb021SLiane Praza </loctext> 219*1f6eb021SLiane Praza </description> 220*1f6eb021SLiane Praza <visibility value='readwrite'/> 221*1f6eb021SLiane Praza <cardinality min='1' max='1'/> 222*1f6eb021SLiane Praza <values> 223*1f6eb021SLiane Praza <value name='/dev/console'> 224*1f6eb021SLiane Praza <description> 225*1f6eb021SLiane Praza <loctext xml:lang='C'> 226*1f6eb021SLiane PrazaThe default console device 227*1f6eb021SLiane Praza </loctext> 228*1f6eb021SLiane Praza </description> 229*1f6eb021SLiane Praza </value> 230*1f6eb021SLiane Praza <value name='/dev/wscons'> 231*1f6eb021SLiane Praza <description> 232*1f6eb021SLiane Praza <loctext xml:lang='C'> 233*1f6eb021SLiane PrazaThe physical workstation console (i.e. keyboard and monitor) 234*1f6eb021SLiane Praza </loctext> 235*1f6eb021SLiane Praza </description> 236*1f6eb021SLiane Praza </value> 237*1f6eb021SLiane Praza <value name='/dev/term/a'> 238*1f6eb021SLiane Praza <description> 239*1f6eb021SLiane Praza <loctext xml:lang='C'> 240*1f6eb021SLiane PrazaSerial device A 241*1f6eb021SLiane Praza </loctext> 242*1f6eb021SLiane Praza </description> 243*1f6eb021SLiane Praza </value> 244*1f6eb021SLiane Praza <value name='/dev/term/b'> 245*1f6eb021SLiane Praza <description> 246*1f6eb021SLiane Praza <loctext xml:lang='C'> 247*1f6eb021SLiane PrazaSerial device B 248*1f6eb021SLiane Praza </loctext> 249*1f6eb021SLiane Praza </description> 250*1f6eb021SLiane Praza </value> 251*1f6eb021SLiane Praza </values> 252*1f6eb021SLiane Praza <choices> 253*1f6eb021SLiane Praza <include_values type='values'/> 254*1f6eb021SLiane Praza </choices> 255*1f6eb021SLiane Praza </prop_pattern> 256*1f6eb021SLiane Praza <prop_pattern name='label' type='astring' 257*1f6eb021SLiane Praza required='false'> 258*1f6eb021SLiane Praza <common_name> 259*1f6eb021SLiane Praza <loctext xml:lang='C'> 260*1f6eb021SLiane Praza/etc/ttydefs entry 261*1f6eb021SLiane Praza </loctext> 262*1f6eb021SLiane Praza </common_name> 263*1f6eb021SLiane Praza <description> 264*1f6eb021SLiane Praza <loctext xml:lang='C'> 265*1f6eb021SLiane PrazaThe appropriate entry from /etc/ttydefs 266*1f6eb021SLiane Praza </loctext> 267*1f6eb021SLiane Praza </description> 268*1f6eb021SLiane Praza <visibility value='readwrite'/> 269*1f6eb021SLiane Praza <cardinality min='1' max='1'/> 270*1f6eb021SLiane Praza </prop_pattern> 271*1f6eb021SLiane Praza <prop_pattern name='timeout' type='count' 272*1f6eb021SLiane Praza required='false'> 273*1f6eb021SLiane Praza <description> 274*1f6eb021SLiane Praza <loctext xml:lang='C'> 275*1f6eb021SLiane PrazaIf no user input is given within the number of seconds defined by this property after the prompt is printed, ttymon should exit. 276*1f6eb021SLiane Praza </loctext> 277*1f6eb021SLiane Praza </description> 278*1f6eb021SLiane Praza <units> 279*1f6eb021SLiane Praza <loctext xml:lang='C'> 280*1f6eb021SLiane Prazaseconds 281*1f6eb021SLiane Praza </loctext> 282*1f6eb021SLiane Praza </units> 283*1f6eb021SLiane Praza <visibility value='readwrite'/> 284*1f6eb021SLiane Praza <cardinality min='1' max='1'/> 285*1f6eb021SLiane Praza </prop_pattern> 286*1f6eb021SLiane Praza <prop_pattern name='nohangup' type='boolean' 287*1f6eb021SLiane Praza required='false'> 288*1f6eb021SLiane Praza <description> 289*1f6eb021SLiane Praza <loctext xml:lang='C'> 290*1f6eb021SLiane PrazaDo not force a hangup on the line by setting the speed to zero before setting the speed to the default or specified speed. 291*1f6eb021SLiane Praza </loctext> 292*1f6eb021SLiane Praza </description> 293*1f6eb021SLiane Praza <visibility value='readwrite'/> 294*1f6eb021SLiane Praza <cardinality min='1' max='1'/> 295*1f6eb021SLiane Praza </prop_pattern> 296*1f6eb021SLiane Praza <prop_pattern name='modules' type='astring' 297*1f6eb021SLiane Praza required='false'> 298*1f6eb021SLiane Praza <common_name> 299*1f6eb021SLiane Praza <loctext xml:lang='C'> 300*1f6eb021SLiane PrazaSTREAMS modules 301*1f6eb021SLiane Praza </loctext> 302*1f6eb021SLiane Praza </common_name> 303*1f6eb021SLiane Praza <description> 304*1f6eb021SLiane Praza <loctext xml:lang='C'> 305*1f6eb021SLiane PrazaSTREAMS modules to be pushed on the terminal 306*1f6eb021SLiane Praza </loctext> 307*1f6eb021SLiane Praza </description> 308*1f6eb021SLiane Praza <visibility value='readwrite'/> 309*1f6eb021SLiane Praza <internal_separators>,</internal_separators> 310*1f6eb021SLiane Praza </prop_pattern> 311*1f6eb021SLiane Praza <prop_pattern name='prompt' type='astring' 312*1f6eb021SLiane Praza required='false'> 313*1f6eb021SLiane Praza <description> 314*1f6eb021SLiane Praza <loctext xml:lang='C'> 315*1f6eb021SLiane PrazaPrompt to be printed on console 316*1f6eb021SLiane Praza </loctext> 317*1f6eb021SLiane Praza </description> 318*1f6eb021SLiane Praza <visibility value='readwrite'/> 319*1f6eb021SLiane Praza <cardinality min='1' max='1'/> 320*1f6eb021SLiane Praza </prop_pattern> 321*1f6eb021SLiane Praza <prop_pattern name='terminal_type' type='astring' 322*1f6eb021SLiane Praza required='false'> 323*1f6eb021SLiane Praza <description> 324*1f6eb021SLiane Praza <loctext xml:lang='C'> 325*1f6eb021SLiane PrazaSets the initial value of the TERM environment variable 326*1f6eb021SLiane Praza </loctext> 327*1f6eb021SLiane Praza </description> 328*1f6eb021SLiane Praza <visibility value='readwrite'/> 329*1f6eb021SLiane Praza <cardinality min='1' max='1'/> 330*1f6eb021SLiane Praza </prop_pattern> 331*1f6eb021SLiane Praza </pg_pattern> 332*1f6eb021SLiane Praza 3337c478bd9Sstevel@tonic-gate </template> 3347c478bd9Sstevel@tonic-gate</service> 3357c478bd9Sstevel@tonic-gate 3367c478bd9Sstevel@tonic-gate</service_bundle> 3377c478bd9Sstevel@tonic-gateEOF 338