make-console-login-xml revision 7c478bd95313f5f23a4c958a745db2134aa03244
#!/sbin/sh
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
case "$MACH" in
sparc)
TTY_TYPE=sun
;;
i386)
TTY_TYPE=sun-color
;;
*)
echo "Unknown machine type $MACH" >&2
exit 1
esac
cat >console-login.xml <<EOF
<?xml version="1.0"?>
<!--
Copyright 2004 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
ident "%Z%%M% %I% %E% SMI"
NOTE: This service manifest is not editable; its contents will
be overwritten by package or patch operations, including
operating system upgrade. Make customizations in a different
file.
-->
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<service_bundle type='manifest' name='SUNWcsr:console'>
<service
name='system/console-login'
type='service'
version='1'>
<create_default_instance enabled='true' />
<single_instance/>
<dependency
name='fs'
grouping='require_all'
restart_on='none'
type='service'>
<service_fmri value='svc:/system/filesystem/minimal' />
</dependency>
<dependency
name='identity'
grouping='require_all'
restart_on='none'
type='service'>
<service_fmri value='svc:/system/identity:node' />
</dependency>
<dependency
name='utmpx'
grouping='require_all'
restart_on='none'
type='service'>
<service_fmri value='svc:/system/utmp:default' />
</dependency>
<!-- Note that console-login should be dependent on any services
that may need to use the console. This requirement can be met
by establishing a dependency on milestone/sysconfig which,
among other things, collects such dependencies.
-->
<dependency
name='sysconfig'
grouping='require_all'
restart_on='none'
type='service'>
<service_fmri value='svc:/milestone/sysconfig' />
</dependency>
<exec_method
type='method'
name='start'
exec='/lib/svc/method/console-login'
timeout_seconds='0' />
<exec_method
type='method'
name='stop'
exec=':kill -9'
timeout_seconds='3' />
<property_group name='startd' type='framework'>
<propval name='duration' type='astring' value='child' />
<propval name='ignore_error' type='astring'
value='core,signal' />
<propval name='utmpx_prefix' type='astring' value='co' />
</property_group>
<!-- these are passed to ttymon in the method script -->
<property_group name='ttymon' type='application'>
<propval name='device' type='astring' value='/dev/console' />
<propval name='label' type='astring' value='console' />
<propval name='timeout' type='count' value='0' />
<propval name='nohangup' type='boolean' value='true' />
<propval name='modules' type='astring'
value='ldterm,ttcompat' />
<propval name='prompt' type='astring'
value='\`uname -n\` console login:' />
<propval name='terminal_type' type='astring'
value='$TTY_TYPE' />
</property_group>
<stability value='Evolving' />
<template>
<common_name>
<loctext xml:lang='C'>
Console login
</loctext>
</common_name>
<documentation>
<manpage title='ttymon' section='1M'
manpath='/usr/share/man' />
</documentation>
</template>
</service>
</service_bundle>
EOF