xref: /illumos-gate/usr/src/cmd/fs.d/nfs/svc/server.xml (revision c211fc479225fa54805cf480633bf6689ca9a2db)
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 2009 Sun Microsystems, Inc.  All rights reserved.
25	Use is subject to license terms.
26
27	NOTE:  This service manifest is not editable; its contents will
28	be overwritten by package or patch operations, including
29	operating system upgrade.  Make customizations in a different
30	file.
31
32	Note: if this service is modified to consist of anything other
33	than a single instance named 'default', you must make changes to
34	$SRC/head/rpcsvc/daemon_utils.h and libnsl:open_daemon_lock().
35-->
36
37<service_bundle type='manifest' name='SUNWnfssr:nfs-server'>
38
39<service
40	name='network/nfs/server'
41	type='service'
42	version='1'>
43
44	<create_default_instance enabled='false' />
45
46	<single_instance />
47
48	<dependency name='network'
49	    grouping='require_any'
50	    restart_on='error'
51	    type='service'>
52		<service_fmri value='svc:/milestone/network' />
53	</dependency>
54
55	<dependency name='nlockmgr'
56	    grouping='require_all'
57	    restart_on='error'
58	    type='service'>
59		<service_fmri value='svc:/network/nfs/nlockmgr' />
60	</dependency>
61
62	<dependency name='mapid'
63	    grouping='optional_all'
64	    restart_on='error'
65	    type='service'>
66		<service_fmri value='svc:/network/nfs/mapid' />
67	</dependency>
68
69	<dependency name='rpcbind'
70	    grouping='require_all'
71	    restart_on='restart'
72	    type='service'>
73		<service_fmri value='svc:/network/rpc/bind' />
74	</dependency>
75
76	<dependency name='keyserv'
77	    grouping='optional_all'
78	    restart_on='none'
79	    type='service'>
80		<service_fmri value='svc:/network/rpc/keyserv' />
81	</dependency>
82
83	<dependency name='gss'
84	    grouping='optional_all'
85	    restart_on='none'
86	    type='service'>
87		<service_fmri value='svc:/network/rpc/gss' />
88	</dependency>
89
90	<dependency name='share-group'
91	    grouping='optional_all'
92	    restart_on='none'
93	    type='service'>
94		<service_fmri value='svc:/network/shares/group' />
95	</dependency>
96
97	<!-- Must have all local filesystems mounted before we share them -->
98	<dependency name='filesystem-local'
99	    grouping='require_all'
100	    restart_on='error'
101	    type='service'>
102	    	<service_fmri value='svc:/system/filesystem/local' />
103	</dependency>
104
105	<dependent
106		name='nfs-server_multi-user-server'
107		grouping='optional_all'
108		restart_on='none'>
109		<service_fmri value='svc:/milestone/multi-user-server' />
110	</dependent>
111
112	<!--
113	  The shareall done as part of the nfs-server method may take a
114	  long time, as the contents of dfstab can be arbitrarily large.
115	  Set the timeout appropriately for both 'start' and 'refresh'.
116	-->
117	<exec_method
118	    type='method'
119	    name='start'
120	    exec='/lib/svc/method/nfs-server %m'
121	    timeout_seconds='3600' />
122
123	<exec_method
124	    type='method'
125	    name='refresh'
126	    exec='/lib/svc/method/nfs-server %m'
127	    timeout_seconds='3600' />
128
129	<!--
130	  The stop method runs unshareall as well as up to a 10 second
131	  sleep to do graceful versus forceful shutdown of daemons.  Set
132	  the timeout appropriately.
133	-->
134	<exec_method
135	    type='method'
136	    name='stop'
137	    exec='/lib/svc/method/nfs-server %m %{restarter/contract}'
138	    timeout_seconds='3600' />
139
140	<property_group name='application' type='framework'>
141		<stability value='Evolving' />
142		<propval name='auto_enable' type='boolean' value='true' />
143	</property_group>
144
145	<property_group name='firewall_context' type='com.sun,fw_definition'>
146		<propval name='name' type='astring' value='nfsd' />
147		<propval name='ipf_method' type='astring'
148		    value='/lib/svc/method/nfs-server ipfilter' />
149	</property_group>
150
151	<property_group name='firewall_config' type='com.sun,fw_configuration'>
152		<propval name='policy' type='astring' value='use_global' />
153		<propval name='apply_to' type='astring' value='' />
154		<propval name='exceptions' type='astring' value='' />
155		<propval name='value_authorization' type='astring'
156			value='solaris.smf.value.firewall.config' />
157	</property_group>
158
159	<stability value='Stable' />
160
161	<template>
162		<common_name>
163			<loctext xml:lang='C'>
164				NFS server
165			</loctext>
166		</common_name>
167		<documentation>
168			<manpage title='nfsd' section='1M'
169				manpath='/usr/share/man' />
170		</documentation>
171	</template>
172</service>
173
174</service_bundle>
175