xref: /illumos-gate/usr/src/cmd/svc/milestone/network-location.xml (revision d48be21240dfd051b689384ce2b23479d757f2d8)
1<?xml version="1.0"?>
2<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
3<!--
4 Copyright 2010 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 (the "License").
11 You may not use this file except in compliance with the License.
12
13 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14 or http://www.opensolaris.org/os/licensing.
15 See the License for the specific language governing permissions
16 and limitations under the License.
17
18 When distributing Covered Code, include this CDDL HEADER in each
19 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20 If applicable, add the following below this CDDL HEADER, with the
21 fields enclosed by brackets "[]" replaced with your own identifying
22 information: Portions Copyright [yyyy] [name of copyright owner]
23
24 CDDL HEADER END
25
26	NOTE:  This service manifest is not editable; its contents will
27	be overwritten by package or patch operations, including
28	operating system upgrade.  Make customizations in a different
29	file.
30-->
31
32<service_bundle type='manifest' name='SUNWcsr:network-location'>
33
34<!--
35  network/location is used as a medium to refresh and restart SMF
36  services dependent on network/location whenever nwamd(8) changes
37  locations.  nwamd(8) updates the different configuration files
38  according to the location being (de)activated and refreshes
39  network/location.  This causes the services dependent on network/location
40  to restart and read in the updated configuration files.
41
42  The following services are dependent on network/location with a
43  "restart_on refresh" dependency:
44
45	svc:/network/dns/client:default
46	svc:/network/nis/client:default
47	svc:/network/ldap/client:default
48	svc:/system/name-service-cache:default
49	svc:/network/nfs/mapid:default
50
51  The following dependents will be refreshed (rather than restarted) and,
52  thus, have a "restart_on none" dependency:
53
54	svc:/network/ipfilter:default
55	svc:/network/ipsec/ike:default
56	svc:/network/ipsec/policy:default
57
58  The name of the location to be activated is set in the location/selected
59  property by nwamd.  If this property group/property does not exist, the
60  NoNet location will be activated as a fallback.
61
62-->
63
64<service
65	name='network/location'
66	type='service'
67	version='1'>
68
69	<instance name='default' enabled='false'>
70
71	<!--
72		nwamd(8) refreshes network/location when a new location is
73		activated, thus the "restart_on none" dependency.
74	-->
75	<dependency
76		name='network-physical'
77		grouping='require_all'
78		restart_on='none'
79		type='service'>
80		<service_fmri value='svc:/network/physical' />
81	</dependency>
82
83	<dependency
84		name='location_netcfg'
85		grouping='require_all'
86		restart_on='none'
87		type='service'>
88		<service_fmri value='svc:/network/netcfg:default' />
89	</dependency>
90
91	<dependency
92		name='filesystem'
93		grouping='require_all'
94		restart_on='none'
95		type='service'>
96		<service_fmri value='svc:/system/filesystem/usr' />
97	</dependency>
98
99	<!--
100		This dependency on system/manifest-import is just for the
101		case of the boot after upgrade.  We don't want
102		network/location starting up until network/netcfg has been
103		imported by manifest-import and enabled.  On top of that,
104		we also want the new manifest for network/ipfilter to be
105		imported before network/location has started.
106	-->
107	<dependency
108		name='manifest-import'
109		grouping='require_all'
110		restart_on='none'
111		type='service'>
112		<service_fmri value='svc:/system/manifest-import:default' />
113	</dependency>
114
115	<!-- The following services are dependent on network/location. -->
116
117	<dependent
118		name='location_dns-client'
119		grouping='optional_all'
120		restart_on='refresh'>
121		<service_fmri value='svc:/network/dns/client' />
122	</dependent>
123
124	<dependent
125		name='location_nis-client'
126		grouping='optional_all'
127		restart_on='refresh'>
128		<service_fmri value='svc:/network/nis/client' />
129	</dependent>
130
131	<dependent
132		name='location_ldap-client'
133		grouping='optional_all'
134		restart_on='refresh'>
135		<service_fmri value='svc:/network/ldap/client' />
136	</dependent>
137
138	<dependent
139		name='location_name-service-cache'
140		grouping='optional_all'
141		restart_on='refresh'>
142		<service_fmri value='svc:/system/name-service-cache' />
143	</dependent>
144
145	<dependent
146		name='location_nfs-mapid'
147		grouping='optional_all'
148		restart_on='refresh'>
149		<service_fmri value='svc:/network/nfs/mapid' />
150	</dependent>
151
152	<dependent
153		name='location_identity-domain'
154		grouping='optional_all'
155		restart_on='refresh'>
156		<service_fmri value='svc:/system/identity:domain' />
157	</dependent>
158
159	<!--
160		The following three dependents will be refreshed by
161		/lib/svc/method/net-loc, rather than restarted,
162		when network/location is refreshed.
163	-->
164
165	<dependent
166		name='location_ipfilter'
167		grouping='optional_all'
168		restart_on='none'>
169		<service_fmri value='svc:/network/ipfilter' />
170	</dependent>
171
172	<dependent
173		name='location_ipsec-ike'
174		grouping='optional_all'
175		restart_on='none'>
176		<service_fmri value='svc:/network/ipsec/ike' />
177	</dependent>
178
179	<dependent
180		name='location_ipsec-policy'
181		grouping='optional_all'
182		restart_on='none'>
183		<service_fmri value='svc:/network/ipsec/policy' />
184	</dependent>
185
186	<exec_method
187		type='method'
188		name='start'
189		exec='/lib/svc/method/net-loc start'
190		timeout_seconds='60' >
191		<method_context>
192			<method_credential user='netadm' group='netadm'
193				supp_groups='netadm' privileges='zone' />
194		</method_context>
195	</exec_method>
196
197	<exec_method
198		type='method'
199		name='refresh'
200		exec='/lib/svc/method/net-loc refresh'
201		timeout_seconds='60' >
202		<method_context>
203			<method_credential user='netadm' group='netadm'
204				supp_groups='netadm' privileges='zone' />
205		</method_context>
206	</exec_method>
207
208	<exec_method
209		type='method'
210		name='stop'
211		exec=':true'
212		timeout_seconds='60' >
213		<method_context>
214			<method_credential user='netadm' group='netadm'
215				supp_groups='netadm' privileges='zone' />
216		</method_context>
217	</exec_method>
218
219	<property_group name='general' type='framework'>
220		<propval name='action_authorization' type='astring'
221			value='solaris.smf.manage.location' />
222	</property_group>
223
224	<property_group name='startd' type='framework'>
225		<propval name='duration' type='astring' value='transient' />
226	</property_group>
227
228	<template>
229		<common_name>
230			<loctext xml:lang='C'>
231				network interface configuration
232			</loctext>
233		</common_name>
234		<documentation>
235			<manpage title='nwamd' section='8'
236				manpath='/usr/share/man' />
237		</documentation>
238	</template>
239
240	</instance>
241
242	<stability value='Unstable' />
243
244</service>
245
246</service_bundle>
247