1*7c478bd9Sstevel@tonic-gate#!/sbin/sh 2*7c478bd9Sstevel@tonic-gate# 3*7c478bd9Sstevel@tonic-gate# CDDL HEADER START 4*7c478bd9Sstevel@tonic-gate# 5*7c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the 6*7c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only 7*7c478bd9Sstevel@tonic-gate# (the "License"). You may not use this file except in compliance 8*7c478bd9Sstevel@tonic-gate# with the License. 9*7c478bd9Sstevel@tonic-gate# 10*7c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 11*7c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing. 12*7c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions 13*7c478bd9Sstevel@tonic-gate# and limitations under the License. 14*7c478bd9Sstevel@tonic-gate# 15*7c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each 16*7c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 17*7c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the 18*7c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying 19*7c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner] 20*7c478bd9Sstevel@tonic-gate# 21*7c478bd9Sstevel@tonic-gate# CDDL HEADER END 22*7c478bd9Sstevel@tonic-gate# 23*7c478bd9Sstevel@tonic-gate# 24*7c478bd9Sstevel@tonic-gate# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 25*7c478bd9Sstevel@tonic-gate# Use is subject to license terms. 26*7c478bd9Sstevel@tonic-gate# 27*7c478bd9Sstevel@tonic-gate#ident "%Z%%M% %I% %E% SMI" 28*7c478bd9Sstevel@tonic-gate 29*7c478bd9Sstevel@tonic-gatecase "$MACH" in 30*7c478bd9Sstevel@tonic-gate sparc) 31*7c478bd9Sstevel@tonic-gate TTY_TYPE=sun 32*7c478bd9Sstevel@tonic-gate ;; 33*7c478bd9Sstevel@tonic-gate i386) 34*7c478bd9Sstevel@tonic-gate TTY_TYPE=sun-color 35*7c478bd9Sstevel@tonic-gate ;; 36*7c478bd9Sstevel@tonic-gate *) 37*7c478bd9Sstevel@tonic-gate echo "Unknown machine type $MACH" >&2 38*7c478bd9Sstevel@tonic-gate exit 1 39*7c478bd9Sstevel@tonic-gateesac 40*7c478bd9Sstevel@tonic-gate 41*7c478bd9Sstevel@tonic-gatecat >console-login.xml <<EOF 42*7c478bd9Sstevel@tonic-gate<?xml version="1.0"?> 43*7c478bd9Sstevel@tonic-gate<!-- 44*7c478bd9Sstevel@tonic-gate Copyright 2004 Sun Microsystems, Inc. All rights reserved. 45*7c478bd9Sstevel@tonic-gate Use is subject to license terms. 46*7c478bd9Sstevel@tonic-gate 47*7c478bd9Sstevel@tonic-gate ident "%Z%%M% %I% %E% SMI" 48*7c478bd9Sstevel@tonic-gate 49*7c478bd9Sstevel@tonic-gate NOTE: This service manifest is not editable; its contents will 50*7c478bd9Sstevel@tonic-gate be overwritten by package or patch operations, including 51*7c478bd9Sstevel@tonic-gate operating system upgrade. Make customizations in a different 52*7c478bd9Sstevel@tonic-gate file. 53*7c478bd9Sstevel@tonic-gate--> 54*7c478bd9Sstevel@tonic-gate 55*7c478bd9Sstevel@tonic-gate<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> 56*7c478bd9Sstevel@tonic-gate 57*7c478bd9Sstevel@tonic-gate<service_bundle type='manifest' name='SUNWcsr:console'> 58*7c478bd9Sstevel@tonic-gate 59*7c478bd9Sstevel@tonic-gate<service 60*7c478bd9Sstevel@tonic-gate name='system/console-login' 61*7c478bd9Sstevel@tonic-gate type='service' 62*7c478bd9Sstevel@tonic-gate version='1'> 63*7c478bd9Sstevel@tonic-gate 64*7c478bd9Sstevel@tonic-gate <create_default_instance enabled='true' /> 65*7c478bd9Sstevel@tonic-gate 66*7c478bd9Sstevel@tonic-gate <single_instance/> 67*7c478bd9Sstevel@tonic-gate 68*7c478bd9Sstevel@tonic-gate <dependency 69*7c478bd9Sstevel@tonic-gate name='fs' 70*7c478bd9Sstevel@tonic-gate grouping='require_all' 71*7c478bd9Sstevel@tonic-gate restart_on='none' 72*7c478bd9Sstevel@tonic-gate type='service'> 73*7c478bd9Sstevel@tonic-gate <service_fmri value='svc:/system/filesystem/minimal' /> 74*7c478bd9Sstevel@tonic-gate </dependency> 75*7c478bd9Sstevel@tonic-gate 76*7c478bd9Sstevel@tonic-gate <dependency 77*7c478bd9Sstevel@tonic-gate name='identity' 78*7c478bd9Sstevel@tonic-gate grouping='require_all' 79*7c478bd9Sstevel@tonic-gate restart_on='none' 80*7c478bd9Sstevel@tonic-gate type='service'> 81*7c478bd9Sstevel@tonic-gate <service_fmri value='svc:/system/identity:node' /> 82*7c478bd9Sstevel@tonic-gate </dependency> 83*7c478bd9Sstevel@tonic-gate 84*7c478bd9Sstevel@tonic-gate <dependency 85*7c478bd9Sstevel@tonic-gate name='utmpx' 86*7c478bd9Sstevel@tonic-gate grouping='require_all' 87*7c478bd9Sstevel@tonic-gate restart_on='none' 88*7c478bd9Sstevel@tonic-gate type='service'> 89*7c478bd9Sstevel@tonic-gate <service_fmri value='svc:/system/utmp:default' /> 90*7c478bd9Sstevel@tonic-gate </dependency> 91*7c478bd9Sstevel@tonic-gate 92*7c478bd9Sstevel@tonic-gate <!-- Note that console-login should be dependent on any services 93*7c478bd9Sstevel@tonic-gate that may need to use the console. This requirement can be met 94*7c478bd9Sstevel@tonic-gate by establishing a dependency on milestone/sysconfig which, 95*7c478bd9Sstevel@tonic-gate among other things, collects such dependencies. 96*7c478bd9Sstevel@tonic-gate --> 97*7c478bd9Sstevel@tonic-gate <dependency 98*7c478bd9Sstevel@tonic-gate name='sysconfig' 99*7c478bd9Sstevel@tonic-gate grouping='require_all' 100*7c478bd9Sstevel@tonic-gate restart_on='none' 101*7c478bd9Sstevel@tonic-gate type='service'> 102*7c478bd9Sstevel@tonic-gate <service_fmri value='svc:/milestone/sysconfig' /> 103*7c478bd9Sstevel@tonic-gate </dependency> 104*7c478bd9Sstevel@tonic-gate 105*7c478bd9Sstevel@tonic-gate <exec_method 106*7c478bd9Sstevel@tonic-gate type='method' 107*7c478bd9Sstevel@tonic-gate name='start' 108*7c478bd9Sstevel@tonic-gate exec='/lib/svc/method/console-login' 109*7c478bd9Sstevel@tonic-gate timeout_seconds='0' /> 110*7c478bd9Sstevel@tonic-gate 111*7c478bd9Sstevel@tonic-gate <exec_method 112*7c478bd9Sstevel@tonic-gate type='method' 113*7c478bd9Sstevel@tonic-gate name='stop' 114*7c478bd9Sstevel@tonic-gate exec=':kill -9' 115*7c478bd9Sstevel@tonic-gate timeout_seconds='3' /> 116*7c478bd9Sstevel@tonic-gate 117*7c478bd9Sstevel@tonic-gate <property_group name='startd' type='framework'> 118*7c478bd9Sstevel@tonic-gate <propval name='duration' type='astring' value='child' /> 119*7c478bd9Sstevel@tonic-gate <propval name='ignore_error' type='astring' 120*7c478bd9Sstevel@tonic-gate value='core,signal' /> 121*7c478bd9Sstevel@tonic-gate <propval name='utmpx_prefix' type='astring' value='co' /> 122*7c478bd9Sstevel@tonic-gate </property_group> 123*7c478bd9Sstevel@tonic-gate 124*7c478bd9Sstevel@tonic-gate <!-- these are passed to ttymon in the method script --> 125*7c478bd9Sstevel@tonic-gate <property_group name='ttymon' type='application'> 126*7c478bd9Sstevel@tonic-gate <propval name='device' type='astring' value='/dev/console' /> 127*7c478bd9Sstevel@tonic-gate <propval name='label' type='astring' value='console' /> 128*7c478bd9Sstevel@tonic-gate <propval name='timeout' type='count' value='0' /> 129*7c478bd9Sstevel@tonic-gate <propval name='nohangup' type='boolean' value='true' /> 130*7c478bd9Sstevel@tonic-gate <propval name='modules' type='astring' 131*7c478bd9Sstevel@tonic-gate value='ldterm,ttcompat' /> 132*7c478bd9Sstevel@tonic-gate <propval name='prompt' type='astring' 133*7c478bd9Sstevel@tonic-gate value='\`uname -n\` console login:' /> 134*7c478bd9Sstevel@tonic-gate <propval name='terminal_type' type='astring' 135*7c478bd9Sstevel@tonic-gate value='$TTY_TYPE' /> 136*7c478bd9Sstevel@tonic-gate </property_group> 137*7c478bd9Sstevel@tonic-gate 138*7c478bd9Sstevel@tonic-gate <stability value='Evolving' /> 139*7c478bd9Sstevel@tonic-gate 140*7c478bd9Sstevel@tonic-gate <template> 141*7c478bd9Sstevel@tonic-gate <common_name> 142*7c478bd9Sstevel@tonic-gate <loctext xml:lang='C'> 143*7c478bd9Sstevel@tonic-gateConsole login 144*7c478bd9Sstevel@tonic-gate </loctext> 145*7c478bd9Sstevel@tonic-gate </common_name> 146*7c478bd9Sstevel@tonic-gate <documentation> 147*7c478bd9Sstevel@tonic-gate <manpage title='ttymon' section='1M' 148*7c478bd9Sstevel@tonic-gate manpath='/usr/share/man' /> 149*7c478bd9Sstevel@tonic-gate </documentation> 150*7c478bd9Sstevel@tonic-gate </template> 151*7c478bd9Sstevel@tonic-gate</service> 152*7c478bd9Sstevel@tonic-gate 153*7c478bd9Sstevel@tonic-gate</service_bundle> 154*7c478bd9Sstevel@tonic-gateEOF 155