<?xml version='1.0'?>
<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
<!--
	Copyright 2007 Jens Elkner.
	$Id$
-->
<service_bundle type='manifest' name='LNFmysql-server:mysqld'>

<service
	name='application/mysqld'
	type='service'
	version='1'>

	<instance name="default" enabled='false' >
		<!--
			Wait for network interfaces to be initialized.
		-->
		<dependency name='network'
			grouping='require_all'
			restart_on='error'
			type='service'>
			<service_fmri value='svc:/milestone/network:default'/>
		</dependency>

		<!--
			Wait for all local filesystems to be mounted.
		-->
		<dependency name='filesystem-local'
			grouping='require_all'
			restart_on='none'
			type='service'>
			<service_fmri value='svc:/system/filesystem/local:default'/>
		</dependency>

		<exec_method
			type='method'
			name='start'
			exec='/etc/svc/method/mysqld start'
			timeout_seconds='60'>
			<method_context>
				<method_credential user='mysql' group='mysql' privileges='basic,!proc_session,!proc_info,!file_link_any,net_privaddr' />
			</method_context>
		</exec_method>

		<exec_method
			type='method'
			name='stop'
			exec='/etc/svc/method/mysqld stop'
			timeout_seconds='60' />

		<property_group name='mysqld' type='application'>
			<stability value='Evolving' />
			<!-- if 'true' start mysqld_multi instead of mysqld_safe -->
			<propval name='multi' type='boolean' value='false'/>
			<!-- see mysqld(1) -->
			<propval name='no_defaults' type='boolean' value='false'/>
			<!-- if multi enabled, used as config-file option -->
			<propval name='defaults_file' type='astring' value='/etc/my.cnf'/>
			<!-- ignored for multi -->
			<propval name='defaults_extra_file' type='astring' value=''/>
		</property_group>
		<property_group name='startd' type='framework'>
			<!-- sub-process core dumps shouldn't restart session -->
			<propval name='ignore_error' type='astring' value='core,signal' />
		</property_group>
		<!--
			Add all users, which should be able to manage this service
			into /etc/user_attr . E.g.:
			echo 'jdoe::::auths=solaris.smf.manage.mysqld' >>/etc/user_attr
		-->
		<property_group name='general' type='framework'>
			<propval name='action_authorization' type='astring'
				value='solaris.smf.manage.mysqld' />
			<propval name='value_authorization' type='astring'
				value='solaris.smf.manage.mysqld' />
        </property_group>
	</instance>
	
	<stability value='Evolving' />

	<template>
		<common_name>
			<loctext xml:lang='C'>
				MySQL 5 Server
			</loctext>
		</common_name>
		<documentation>
			<manpage title='mysqld' section='1'
				manpath='@CLIENT_BASEDIR@/man' />
			<doc_link name='mysql.org'
				uri='http://mysql.org/doc/' />
		</documentation>
	</template>
</service>

</service_bundle>
