1#!/sbin/sh 2# 3# CDDL HEADER START 4# 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. 8# 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. 13# 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] 19# 20# CDDL HEADER END 21# 22 23# 24# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 25# Use is subject to license terms. 26# 27# ident "%Z%%M% %I% %E% SMI" 28 29cat >console-login.xml <<EOF 30<?xml version="1.0"?> 31<!-- 32 Copyright 2006 Sun Microsystems, Inc. All rights reserved. 33 Use is subject to license terms. 34 35 ident "%Z%%M% %I% %E% SMI" 36 37 NOTE: This service manifest is not editable; its contents will 38 be overwritten by package or patch operations, including 39 operating system upgrade. Make customizations in a different 40 file. 41--> 42 43<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> 44 45<service_bundle type='manifest' name='SUNWcsr:console'> 46 47<service 48 name='system/console-login' 49 type='service' 50 version='1'> 51 52 <create_default_instance enabled='true' /> 53 54 <single_instance/> 55 56 <dependency 57 name='fs' 58 grouping='require_all' 59 restart_on='none' 60 type='service'> 61 <service_fmri value='svc:/system/filesystem/minimal' /> 62 </dependency> 63 64 <dependency 65 name='identity' 66 grouping='require_all' 67 restart_on='none' 68 type='service'> 69 <service_fmri value='svc:/system/identity:node' /> 70 </dependency> 71 72 <dependency 73 name='utmpx' 74 grouping='require_all' 75 restart_on='none' 76 type='service'> 77 <service_fmri value='svc:/system/utmp:default' /> 78 </dependency> 79 80 <!-- Note that console-login should be dependent on any services 81 that may need to use the console. This requirement can be met 82 by establishing a dependency on milestone/sysconfig which, 83 among other things, collects such dependencies. 84 --> 85 <dependency 86 name='sysconfig' 87 grouping='require_all' 88 restart_on='none' 89 type='service'> 90 <service_fmri value='svc:/milestone/sysconfig' /> 91 </dependency> 92 93 <exec_method 94 type='method' 95 name='start' 96 exec='/lib/svc/method/console-login' 97 timeout_seconds='0' /> 98 99 <exec_method 100 type='method' 101 name='stop' 102 exec=':kill -9' 103 timeout_seconds='3' /> 104 105 <property_group name='startd' type='framework'> 106 <propval name='duration' type='astring' value='child' /> 107 <propval name='ignore_error' type='astring' 108 value='core,signal' /> 109 <propval name='utmpx_prefix' type='astring' value='co' /> 110 </property_group> 111 112 <!-- these are passed to ttymon in the method script --> 113 <property_group name='ttymon' type='application'> 114 <propval name='device' type='astring' value='/dev/console' /> 115 <propval name='label' type='astring' value='console' /> 116 <propval name='timeout' type='count' value='0' /> 117 <propval name='nohangup' type='boolean' value='true' /> 118 <propval name='modules' type='astring' 119 value='ldterm,ttcompat' /> 120 <propval name='prompt' type='astring' 121 value='\`uname -n\` console login:' /> 122 <propval name='terminal_type' type='astring' 123 value='' /> 124 </property_group> 125 126 <stability value='Evolving' /> 127 128 <template> 129 <common_name> 130 <loctext xml:lang='C'> 131Console login 132 </loctext> 133 </common_name> 134 <documentation> 135 <manpage title='ttymon' section='1M' 136 manpath='/usr/share/man' /> 137 </documentation> 138 </template> 139</service> 140 141</service_bundle> 142EOF 143