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<!-- 311f6eb021SLiane 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'> 91*82ae1648SAndy Fiddaman <method_context working_directory='/'> 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'> 101*82ae1648SAndy Fiddaman <method_context working_directory='/'> 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 123bbf21555SRichard Lowe and it's for smf_security(7). 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> 207bbf21555SRichard Lowe <manpage title='ttymon' section='8' 2087c478bd9Sstevel@tonic-gate manpath='/usr/share/man' /> 2097c478bd9Sstevel@tonic-gate </documentation> 2101f6eb021SLiane Praza 2111f6eb021SLiane Praza <pg_pattern name='ttymon' type='application' target='this' 2121f6eb021SLiane Praza required='false'> 2131f6eb021SLiane Praza <prop_pattern name='device' type='astring' 2141f6eb021SLiane Praza required='false'> 2151f6eb021SLiane Praza <description> 2161f6eb021SLiane Praza <loctext xml:lang='C'> 2171f6eb021SLiane PrazaThe terminal device to be used for the console login prompt. 2181f6eb021SLiane Praza </loctext> 2191f6eb021SLiane Praza </description> 2201f6eb021SLiane Praza <visibility value='readwrite'/> 2211f6eb021SLiane Praza <cardinality min='1' max='1'/> 2221f6eb021SLiane Praza <values> 2231f6eb021SLiane Praza <value name='/dev/console'> 2241f6eb021SLiane Praza <description> 2251f6eb021SLiane Praza <loctext xml:lang='C'> 2261f6eb021SLiane PrazaThe default console device 2271f6eb021SLiane Praza </loctext> 2281f6eb021SLiane Praza </description> 2291f6eb021SLiane Praza </value> 2301f6eb021SLiane Praza <value name='/dev/wscons'> 2311f6eb021SLiane Praza <description> 2321f6eb021SLiane Praza <loctext xml:lang='C'> 2331f6eb021SLiane PrazaThe physical workstation console (i.e. keyboard and monitor) 2341f6eb021SLiane Praza </loctext> 2351f6eb021SLiane Praza </description> 2361f6eb021SLiane Praza </value> 2371f6eb021SLiane Praza <value name='/dev/term/a'> 2381f6eb021SLiane Praza <description> 2391f6eb021SLiane Praza <loctext xml:lang='C'> 2401f6eb021SLiane PrazaSerial device A 2411f6eb021SLiane Praza </loctext> 2421f6eb021SLiane Praza </description> 2431f6eb021SLiane Praza </value> 2441f6eb021SLiane Praza <value name='/dev/term/b'> 2451f6eb021SLiane Praza <description> 2461f6eb021SLiane Praza <loctext xml:lang='C'> 2471f6eb021SLiane PrazaSerial device B 2481f6eb021SLiane Praza </loctext> 2491f6eb021SLiane Praza </description> 2501f6eb021SLiane Praza </value> 2511f6eb021SLiane Praza </values> 2521f6eb021SLiane Praza <choices> 2531f6eb021SLiane Praza <include_values type='values'/> 2541f6eb021SLiane Praza </choices> 2551f6eb021SLiane Praza </prop_pattern> 2561f6eb021SLiane Praza <prop_pattern name='label' type='astring' 2571f6eb021SLiane Praza required='false'> 2581f6eb021SLiane Praza <common_name> 2591f6eb021SLiane Praza <loctext xml:lang='C'> 2601f6eb021SLiane Praza/etc/ttydefs entry 2611f6eb021SLiane Praza </loctext> 2621f6eb021SLiane Praza </common_name> 2631f6eb021SLiane Praza <description> 2641f6eb021SLiane Praza <loctext xml:lang='C'> 2651f6eb021SLiane PrazaThe appropriate entry from /etc/ttydefs 2661f6eb021SLiane Praza </loctext> 2671f6eb021SLiane Praza </description> 2681f6eb021SLiane Praza <visibility value='readwrite'/> 2691f6eb021SLiane Praza <cardinality min='1' max='1'/> 2701f6eb021SLiane Praza </prop_pattern> 2711f6eb021SLiane Praza <prop_pattern name='timeout' type='count' 2721f6eb021SLiane Praza required='false'> 2731f6eb021SLiane Praza <description> 2741f6eb021SLiane Praza <loctext xml:lang='C'> 2751f6eb021SLiane PrazaIf no user input is given within the number of seconds defined by this property after the prompt is printed, ttymon should exit. 2761f6eb021SLiane Praza </loctext> 2771f6eb021SLiane Praza </description> 2781f6eb021SLiane Praza <units> 2791f6eb021SLiane Praza <loctext xml:lang='C'> 2801f6eb021SLiane Prazaseconds 2811f6eb021SLiane Praza </loctext> 2821f6eb021SLiane Praza </units> 2831f6eb021SLiane Praza <visibility value='readwrite'/> 2841f6eb021SLiane Praza <cardinality min='1' max='1'/> 2851f6eb021SLiane Praza </prop_pattern> 2861f6eb021SLiane Praza <prop_pattern name='nohangup' type='boolean' 2871f6eb021SLiane Praza required='false'> 2881f6eb021SLiane Praza <description> 2891f6eb021SLiane Praza <loctext xml:lang='C'> 2901f6eb021SLiane PrazaDo not force a hangup on the line by setting the speed to zero before setting the speed to the default or specified speed. 2911f6eb021SLiane Praza </loctext> 2921f6eb021SLiane Praza </description> 2931f6eb021SLiane Praza <visibility value='readwrite'/> 2941f6eb021SLiane Praza <cardinality min='1' max='1'/> 2951f6eb021SLiane Praza </prop_pattern> 2961f6eb021SLiane Praza <prop_pattern name='modules' type='astring' 2971f6eb021SLiane Praza required='false'> 2981f6eb021SLiane Praza <common_name> 2991f6eb021SLiane Praza <loctext xml:lang='C'> 3001f6eb021SLiane PrazaSTREAMS modules 3011f6eb021SLiane Praza </loctext> 3021f6eb021SLiane Praza </common_name> 3031f6eb021SLiane Praza <description> 3041f6eb021SLiane Praza <loctext xml:lang='C'> 3051f6eb021SLiane PrazaSTREAMS modules to be pushed on the terminal 3061f6eb021SLiane Praza </loctext> 3071f6eb021SLiane Praza </description> 3081f6eb021SLiane Praza <visibility value='readwrite'/> 3091f6eb021SLiane Praza <internal_separators>,</internal_separators> 3101f6eb021SLiane Praza </prop_pattern> 3111f6eb021SLiane Praza <prop_pattern name='prompt' type='astring' 3121f6eb021SLiane Praza required='false'> 3131f6eb021SLiane Praza <description> 3141f6eb021SLiane Praza <loctext xml:lang='C'> 3151f6eb021SLiane PrazaPrompt to be printed on console 3161f6eb021SLiane Praza </loctext> 3171f6eb021SLiane Praza </description> 3181f6eb021SLiane Praza <visibility value='readwrite'/> 3191f6eb021SLiane Praza <cardinality min='1' max='1'/> 3201f6eb021SLiane Praza </prop_pattern> 3211f6eb021SLiane Praza <prop_pattern name='terminal_type' type='astring' 3221f6eb021SLiane Praza required='false'> 3231f6eb021SLiane Praza <description> 3241f6eb021SLiane Praza <loctext xml:lang='C'> 3251f6eb021SLiane PrazaSets the initial value of the TERM environment variable 3261f6eb021SLiane Praza </loctext> 3271f6eb021SLiane Praza </description> 3281f6eb021SLiane Praza <visibility value='readwrite'/> 3291f6eb021SLiane Praza <cardinality min='1' max='1'/> 3301f6eb021SLiane Praza </prop_pattern> 3311f6eb021SLiane Praza </pg_pattern> 3321f6eb021SLiane Praza 3337c478bd9Sstevel@tonic-gate </template> 3347c478bd9Sstevel@tonic-gate</service> 3357c478bd9Sstevel@tonic-gate 3367c478bd9Sstevel@tonic-gate</service_bundle> 3377c478bd9Sstevel@tonic-gateEOF 338