<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
	 Bruno Bonfils, <asyd@asyd.net>
	 April 2006
    Use is subject to CDDL license terms.
-->

<service_bundle type='manifest' name='bind9'>

<service
	name='network/dns/bind9'
	type='service'
	version='1'>

	<dependency
	    name='filesystem_minimal'
	    grouping='require_all'
	    restart_on='none'
	    type='service'>
		<service_fmri value='svc:/system/filesystem/minimal' />
	</dependency>

	<dependency
	    name='loopback'
	    grouping='require_any'
	    restart_on='error'
	    type='service'>
		<service_fmri value='svc:/network/loopback' />
	</dependency>

	<dependency
	    name='network'
	    grouping='optional_all'
	    restart_on='error'
	    type='service'>
		<service_fmri value='svc:/milestone/network' />
	</dependency>

	<exec_method
	    type='method'
	    name='stop'
	    exec=':kill'
	    timeout_seconds='60' />

	<instance name='default' enabled='false' >
		<!--
			To be able to run multiple named with their own config
			file, this dependency needs to be at the instance level.
		-->
		<dependency
		    name='config_data'
		    grouping='require_all'
		    restart_on='none'
		    type='path'>
			<service_fmri value='file://localhost/etc/bind9/named.conf' />
		</dependency>

		<exec_method
		    type='method'
		    name='start'
		    exec='/lib/svc/method/dns-bind9 start'
		    timeout_seconds='60' >
		</exec_method>

		<exec_method
		    type='method'
		    name='stop'
		    exec='/lib/svc/method/dns-bind9 stop'
		    timeout_seconds='60' >
		</exec_method>

		<exec_method
		    type='method'
		    name='refresh'
		    exec='/lib/svc/method/dns-bind9 refresh'
		    timeout_seconds='60' >
		</exec_method>

	</instance>

	<stability value='Unstable' />

	<template>
		<common_name>
			<loctext xml:lang='C'>
				BIND 9 DNS server
			</loctext>
		</common_name>
		<documentation>
			<manpage title='named' section='1M'
			    manpath='/usr/pkg/man' />
		</documentation>
	</template>

</service>

</service_bundle>
