xref: /titanic_52/usr/src/cmd/iscsid/iscsi-initiator.xml (revision e5803b76927480e8f9b67b22201c484ccf4c2bcf)
1<?xml version='1.0'?>
2<!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'>
3
4<!--
5
6 CDDL HEADER START
7
8 The contents of this file are subject to the terms of the
9 Common Development and Distribution License (the "License").
10 You may not use this file except in compliance with the License.
11
12 You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
13 or http://www.opensolaris.org/os/licensing.
14 See the License for the specific language governing permissions
15 and limitations under the License.
16
17 When distributing Covered Code, include this CDDL HEADER in each
18 file and include the License file at usr/src/OPENSOLARIS.LICENSE.
19 If applicable, add the following below this CDDL HEADER, with the
20 fields enclosed by brackets "[]" replaced with your own identifying
21 information: Portions Copyright [yyyy] [name of copyright owner]
22
23 CDDL HEADER END
24
25 Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
26
27	Service manifests for the iSCSI Initiator
28-->
29
30<!--
31GLXXX: Instance creation guidelines:
32
33Currently inetd doesn't support property composition in the configuration of
34it's instances. It expects to find the "proto" property in the instances
35"inetd_private" property group, and all other properties (including the
36default back ones) in the "inetd_private" property group of the service.
37This means that only the "proto" field can be specialized for an instance, which
38limits the creation of instances of a service to only those with all fields
39common, bar the "proto" field. This would enable the following two services
40to be created as instances of a common service:
41
42exec    stream  tcp     nowait  root    /usr/sbin/in.rexecd     in.rexecd
43exec    stream  tcp6    nowait  root    /usr/sbin/in.rexecd     in.rexecd
44
45but dissallow common service create for these (different socket type):
46
47time    stream  tcp6    nowait  root    internal
48time    dgram   udp6    wait    root    internal
49
50To be more specific, for rpc services all the netids associated with the
51service would need a seperate instance creating under a common service, with
52the instance name and the "proto" being the netid. For non-rpc based
53services only services with changes limited to the "proto" field (such as
54udp/upd6 and tcp/tcp6) can have instances created under a common service - as
55in the exec example above.
56
57I neglected to mention that the composition limitation applies for methods
58also, so an instance can't have a different method than its service.
59
60Inetd is soon going to change to use instance composition for its configuration.
61This will mean that any of the properties/methods can be present in either the
62instance or the service (with the instance one overriding in the case both are
63present) and that multiple instances can be created for a service with the
64potential to specialize all the properties/methods.
65
66-->
67
68<service_bundle type='manifest' name='SUNWiscsir:iscsi-initiator'>
69
70<service
71    name='network/iscsi/initiator'
72    type='service'
73    version='1'>
74
75    <single_instance/>
76
77    <dependency
78	name='network'
79	grouping='require_any'
80	restart_on='error'
81	type='service'>
82	<service_fmri value='svc:/milestone/network' />
83    </dependency>
84
85    <dependency
86        name='net'
87        grouping='require_all'
88        restart_on='none'
89        type='service'>
90        <service_fmri value='svc:/network/service' />
91    </dependency>
92
93    <dependency
94        name='loopback'
95        grouping='require_any'
96        restart_on='error'
97        type='service'>
98        <service_fmri value='svc:/network/loopback' />
99    </dependency>
100
101    <dependent
102	name='iscsi-initiator_multi-user'
103	grouping='optional_all'
104	restart_on='none'>
105	<service_fmri value='svc:/milestone/multi-user' />
106    </dependent>
107
108	<!--
109	   Set a timeout of -1 to signify to inetd that we don't want
110	   to timeout this service, since the forked process is the
111	   one that does the services work. This is the case for most/all
112	   legacy inetd services; for services written to take advantage
113	   of Greenlines capabilities, the start method should fork
114	   off a process to handle the request and return a success code.
115	-->
116	<exec_method
117		type='method'
118		name='start'
119		exec='/lib/svc/method/iscsi-initiator %m'
120		timeout_seconds='600'>
121		<method_context>
122			<method_credential
123			user='root'
124			group='root'
125			privileges='basic,sys_devices,sys_mount'
126			/>
127		</method_context>
128	</exec_method>
129
130	<exec_method
131		type='method'
132		name='stop'
133		exec='/lib/svc/method/iscsi-initiator %m'
134		timeout_seconds='600'>
135		<method_context>
136			<method_credential
137			user='root'
138			group='root'
139			privileges='basic,sys_devices,sys_mount'
140			/>
141		</method_context>
142	</exec_method>
143
144	<!--
145	    Create an enabled instance.
146	-->
147	<instance
148        name='default'
149        enabled='true' >
150	</instance>
151
152	<stability value='Evolving' />
153
154	<template>
155		<common_name>
156			<loctext xml:lang='C'>
157				iSCSI initiator daemon
158			</loctext>
159		</common_name>
160
161		<documentation>
162			<manpage
163				title='iscsi'
164				section='7D'
165				manpath='/usr/share/man' />
166		</documentation>
167	</template>
168</service>
169
170</service_bundle>
171