xref: /titanic_52/usr/src/cmd/fs.d/nfs/svc/server.xml (revision 18c2aff776a775d34a4c9893a4c72e0434d68e36)
1<?xml version="1.0"?>
2<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
3<!--
4 Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
5 Use is subject to license terms.
6
7 CDDL HEADER START
8
9 The contents of this file are subject to the terms of the
10 Common Development and Distribution License, Version 1.0 only
11 (the "License").  You may not use this file except in compliance
12 with the License.
13
14 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
15 or http://www.opensolaris.org/os/licensing.
16 See the License for the specific language governing permissions
17 and limitations under the License.
18
19 When distributing Covered Code, include this CDDL HEADER in each
20 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
21 If applicable, add the following below this CDDL HEADER, with the
22 fields enclosed by brackets "[]" replaced with your own identifying
23 information: Portions Copyright [yyyy] [name of copyright owner]
24
25 CDDL HEADER END
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	<!-- Must have all local filesystems mounted before we share them -->
93	<dependency name='filesystem-local'
94	    grouping='require_all'
95	    restart_on='error'
96	    type='service'>
97	    	<service_fmri value='svc:/system/filesystem/local' />
98	</dependency>
99
100	<dependent
101		name='nfs-server_multi-user-server'
102		grouping='optional_all'
103		restart_on='none'>
104		<service_fmri value='svc:/milestone/multi-user-server' />
105	</dependent>
106
107	<!--
108	  The shareall done as part of the nfs-server method may take a
109	  long time, as the contents of dfstab can be arbitrarily large.
110	  Set the timeout appropriately for both 'start' and 'refresh'.
111	-->
112	<exec_method
113	    type='method'
114	    name='start'
115	    exec='/lib/svc/method/nfs-server %m'
116	    timeout_seconds='3600' />
117
118	<exec_method
119	    type='method'
120	    name='refresh'
121	    exec='/lib/svc/method/nfs-server %m'
122	    timeout_seconds='3600' />
123
124	<!--
125	  The stop method runs unshareall as well as up to a 10 second
126	  sleep to do graceful versus forceful shutdown of daemons.  Set
127	  the timeout appropriately.
128	-->
129	<exec_method
130	    type='method'
131	    name='stop'
132	    exec='/lib/svc/method/nfs-server %m %{restarter/contract}'
133	    timeout_seconds='3600' />
134
135	<property_group name='application' type='framework'>
136		<stability value='Evolving' />
137		<propval name='auto_enable' type='boolean' value='true' />
138	</property_group>
139
140	<stability value='Stable' />
141
142	<template>
143		<common_name>
144			<loctext xml:lang='C'>
145				NFS server
146			</loctext>
147		</common_name>
148		<documentation>
149			<manpage title='nfsd' section='1M'
150				manpath='/usr/share/man' />
151		</documentation>
152	</template>
153</service>
154
155</service_bundle>
156