xref: /titanic_41/usr/src/cmd/fs.d/nfs/svc/server.xml (revision 0bb073995ac5a95bd35f2dd790df1ea3d8c2d507)
1<?xml version="1.0"?>
2<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
3<!--
4
5 CDDL HEADER START
6
7	The contents of this file are subject to the terms of the
8	Common Development and Distribution License (the "License").
9	You may not use this file except in compliance with the License.
10
11	You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
12	or http://www.opensolaris.org/os/licensing.
13	See the License for the specific language governing permissions
14	and limitations under the License.
15
16	When distributing Covered Code, include this CDDL HEADER in each
17	file and include the License file at usr/src/OPENSOLARIS.LICENSE.
18	If applicable, add the following below this CDDL HEADER, with the
19	fields enclosed by brackets "[]" replaced with your own identifying
20	information: Portions Copyright [yyyy] [name of copyright owner]
21
22 CDDL HEADER END
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
29	NOTE:  This service manifest is not editable; its contents will
30	be overwritten by package or patch operations, including
31	operating system upgrade.  Make customizations in a different
32	file.
33
34	Note: if this service is modified to consist of anything other
35	than a single instance named 'default', you must make changes to
36	$SRC/head/rpcsvc/daemon_utils.h and libnsl:open_daemon_lock().
37-->
38
39<service_bundle type='manifest' name='SUNWnfssr:nfs-server'>
40
41<service
42	name='network/nfs/server'
43	type='service'
44	version='1'>
45
46	<create_default_instance enabled='false' />
47
48	<single_instance />
49
50	<dependency name='network'
51	    grouping='require_any'
52	    restart_on='error'
53	    type='service'>
54		<service_fmri value='svc:/milestone/network' />
55	</dependency>
56
57	<dependency name='nlockmgr'
58	    grouping='require_all'
59	    restart_on='error'
60	    type='service'>
61		<service_fmri value='svc:/network/nfs/nlockmgr' />
62	</dependency>
63
64	<dependency name='mapid'
65	    grouping='optional_all'
66	    restart_on='error'
67	    type='service'>
68		<service_fmri value='svc:/network/nfs/mapid' />
69	</dependency>
70
71	<dependency name='rpcbind'
72	    grouping='require_all'
73	    restart_on='restart'
74	    type='service'>
75		<service_fmri value='svc:/network/rpc/bind' />
76	</dependency>
77
78	<dependency name='keyserv'
79	    grouping='optional_all'
80	    restart_on='none'
81	    type='service'>
82		<service_fmri value='svc:/network/rpc/keyserv' />
83	</dependency>
84
85	<dependency name='gss'
86	    grouping='optional_all'
87	    restart_on='none'
88	    type='service'>
89		<service_fmri value='svc:/network/rpc/gss' />
90	</dependency>
91
92	<dependency name='share-group'
93	    grouping='optional_all'
94	    restart_on='none'
95	    type='service'>
96		<service_fmri value='svc:/network/shares/group' />
97	</dependency>
98
99	<!-- Must have all local filesystems mounted before we share them -->
100	<dependency name='filesystem-local'
101	    grouping='require_all'
102	    restart_on='error'
103	    type='service'>
104	    	<service_fmri value='svc:/system/filesystem/local' />
105	</dependency>
106
107	<dependent
108		name='nfs-server_multi-user-server'
109		grouping='optional_all'
110		restart_on='none'>
111		<service_fmri value='svc:/milestone/multi-user-server' />
112	</dependent>
113
114	<!--
115	  The shareall done as part of the nfs-server method may take a
116	  long time, as the contents of dfstab can be arbitrarily large.
117	  Set the timeout appropriately for both 'start' and 'refresh'.
118	-->
119	<exec_method
120	    type='method'
121	    name='start'
122	    exec='/lib/svc/method/nfs-server %m'
123	    timeout_seconds='3600' />
124
125	<exec_method
126	    type='method'
127	    name='refresh'
128	    exec='/lib/svc/method/nfs-server %m'
129	    timeout_seconds='3600' />
130
131	<!--
132	  The stop method runs unshareall as well as up to a 10 second
133	  sleep to do graceful versus forceful shutdown of daemons.  Set
134	  the timeout appropriately.
135	-->
136	<exec_method
137	    type='method'
138	    name='stop'
139	    exec='/lib/svc/method/nfs-server %m %{restarter/contract}'
140	    timeout_seconds='3600' />
141
142	<property_group name='application' type='framework'>
143		<stability value='Evolving' />
144		<propval name='auto_enable' type='boolean' value='true' />
145	</property_group>
146
147	<stability value='Stable' />
148
149	<template>
150		<common_name>
151			<loctext xml:lang='C'>
152				NFS server
153			</loctext>
154		</common_name>
155		<documentation>
156			<manpage title='nfsd' section='1M'
157				manpath='/usr/share/man' />
158		</documentation>
159	</template>
160</service>
161
162</service_bundle>
163