Print this page
12071 clarify implementation of single_instance in SMF services
Reviewed by: Robert Mustacchi <rm@fingolfin.org>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/svc/milestone/network-physical.xml
+++ new/usr/src/cmd/svc/milestone/network-physical.xml
1 1 <?xml version="1.0"?>
2 2 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
3 3 <!--
4 4 Copyright 2010 Sun Microsystems, Inc. All rights reserved.
5 5 Use is subject to license terms.
6 6
7 + Copyright 2019 Joyent, Inc.
8 +
7 9 CDDL HEADER START
8 10
9 11 The contents of this file are subject to the terms of the
10 12 Common Development and Distribution License (the "License").
11 13 You may not use this file except in compliance with the License.
12 14
13 15 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14 16 or http://www.opensolaris.org/os/licensing.
15 17 See the License for the specific language governing permissions
16 18 and limitations under the License.
17 19
18 20 When distributing Covered Code, include this CDDL HEADER in each
19 21 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20 22 If applicable, add the following below this CDDL HEADER, with the
21 23 fields enclosed by brackets "[]" replaced with your own identifying
22 24 information: Portions Copyright [yyyy] [name of copyright owner]
23 25
24 26 CDDL HEADER END
25 27
26 28 NOTE: This service manifest is not editable; its contents will
27 29 be overwritten by package or patch operations, including
28 30 operating system upgrade. Make customizations in a different
29 31 file.
30 32 -->
31 33
32 34 <service_bundle type='manifest' name='SUNWcsr:network-physical'>
33 35
34 36 <service
35 37 name='network/physical'
36 38 type='service'
37 39 version='1'>
38 40
39 41 <!-- ifconfig needs loopback for IPC with dhcpagent -->
40 42 <dependency
41 43 name='loopback'
42 44 grouping='require_all'
↓ open down ↓ |
26 lines elided |
↑ open up ↑ |
43 45 restart_on='none'
44 46 type='service'>
45 47 <service_fmri value='svc:/network/loopback' />
46 48 </dependency>
47 49
48 50 <instance name='default' enabled='true'>
49 51
50 52 <!--
51 53 physical:default and physical:nwam are mutually exclusive.
52 54 Use a one-way dependency for now since two-way exclude_all
53 - does not work; enforcement of single_instance in the future
54 - will fix this.
55 + does not work.
55 56 -->
56 57 <dependency
57 58 name='physical_nwam'
58 59 grouping='exclude_all'
59 60 restart_on='none'
60 61 type='service'>
61 62 <service_fmri value='svc:/network/physical:nwam' />
62 63 </dependency>
63 64
64 65 <exec_method
65 66 type='method'
66 67 name='start'
67 68 exec='/lib/svc/method/net-physical'
68 69 timeout_seconds='600' />
69 70
70 71 <exec_method
71 72 type='method'
72 73 name='stop'
73 74 exec=':true'
74 75 timeout_seconds='3' />
75 76
76 77 <property_group name='startd' type='framework'>
77 78 <propval name='duration' type='astring' value='transient' />
78 79 </property_group>
79 80
80 81 <template>
81 82 <common_name>
82 83 <loctext xml:lang='C'>
83 84 physical network interfaces
84 85 </loctext>
85 86 </common_name>
86 87 <documentation>
87 88 <manpage title='ifconfig' section='1M'
88 89 manpath='/usr/share/man' />
89 90 </documentation>
90 91 </template>
91 92
92 93 </instance>
93 94
94 95 <instance name='nwam' enabled='false'>
95 96
96 97 <exec_method
97 98 type='method'
98 99 name='start'
99 100 exec='/lib/svc/method/net-nwam start'
100 101 timeout_seconds='120' >
101 102 <method_context>
102 103 <method_credential user='root' group='root'
103 104 supp_groups='netadm' privileges='zone' />
104 105 </method_context>
105 106 </exec_method>
106 107
107 108 <exec_method
108 109 type='method'
109 110 name='stop'
110 111 exec='/lib/svc/method/net-nwam stop'
111 112 timeout_seconds='60' >
112 113 <method_context>
113 114 <method_credential user='root' group='root'
114 115 supp_groups='netadm' privileges='zone' />
115 116 </method_context>
116 117 </exec_method>
117 118
118 119 <exec_method
119 120 type='method'
120 121 name='refresh'
121 122 exec='/lib/svc/method/net-nwam refresh'
122 123 timeout_seconds='60' >
123 124 <method_context>
124 125 <method_credential user='root' group='root'
125 126 supp_groups='netadm' privileges='zone' />
126 127 </method_context>
127 128 </exec_method>
128 129
129 130 <property_group name='general' type='framework'>
130 131 <!-- to start/stop NWAM services -->
131 132 <propval name='action_authorization' type='astring'
132 133 value='solaris.smf.manage.nwam' />
133 134 <propval name='value_authorization' type='astring'
134 135 value='solaris.smf.manage.nwam' />
135 136 </property_group>
136 137
137 138 <property_group name='nwamd' type='application'>
138 139 <stability value='Unstable' />
139 140 <propval name='debug' type='boolean' value='false' />
140 141 <propval name='autoconf' type='boolean' value='false' />
141 142 <propval name='ncu_wait_time' type='count' value='60' />
142 143 <propval name='condition_check_interval' type='count'
143 144 value='120' />
144 145 <propval name='scan_interval' type='count' value='120' />
145 146 <propval name='scan_level' type='astring' value='weak' />
146 147 <propval name='strict_bssid' type='boolean' value='false' />
147 148 <propval name='active_ncp' type='astring' value='Automatic' />
148 149 <propval name='value_authorization' type='astring'
149 150 value='solaris.smf.value.nwam' />
150 151 </property_group>
151 152
152 153 <template>
153 154 <common_name>
154 155 <loctext xml:lang='C'>
155 156 physical network interface autoconfiguration
156 157 </loctext>
157 158 </common_name>
158 159 <documentation>
159 160 <manpage title='nwamd' section='1M'
160 161 manpath='/usr/share/man' />
161 162 <doc_link
162 163 name='Network Auto-Magic OpenSolaris Project Page'
163 164 uri='http://hub.opensolaris.org/bin/view/Project+nwam/'
164 165 />
165 166 </documentation>
166 167 </template>
167 168
168 169 </instance>
169 170
170 171 <stability value='Unstable' />
171 172
172 173 </service>
173 174
174 175 </service_bundle>
↓ open down ↓ |
110 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX