xref: /titanic_44/usr/src/cmd/iscsid/iscsi-initiator.xml (revision 1cb875ae88fb9463b368e725c2444776595895cb)
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 2009 Sun Microsystems, Inc.  All rights reserved.
26	Use is subject to license terms.
27
28	Service manifests for the iSCSI Initiator
29-->
30
31<!--
32GLXXX: Instance creation guidelines:
33
34Currently inetd doesn't support property composition in the configuration of
35it's instances. It expects to find the "proto" property in the instances
36"inetd_private" property group, and all other properties (including the
37default back ones) in the "inetd_private" property group of the service.
38This means that only the "proto" field can be specialized for an instance, which
39limits the creation of instances of a service to only those with all fields
40common, bar the "proto" field. This would enable the following two services
41to be created as instances of a common service:
42
43exec    stream  tcp     nowait  root    /usr/sbin/in.rexecd     in.rexecd
44exec    stream  tcp6    nowait  root    /usr/sbin/in.rexecd     in.rexecd
45
46but dissallow common service create for these (different socket type):
47
48time    stream  tcp6    nowait  root    internal
49time    dgram   udp6    wait    root    internal
50
51To be more specific, for rpc services all the netids associated with the
52service would need a seperate instance creating under a common service, with
53the instance name and the "proto" being the netid. For non-rpc based
54services only services with changes limited to the "proto" field (such as
55udp/upd6 and tcp/tcp6) can have instances created under a common service - as
56in the exec example above.
57
58I neglected to mention that the composition limitation applies for methods
59also, so an instance can't have a different method than its service.
60
61Inetd is soon going to change to use instance composition for its configuration.
62This will mean that any of the properties/methods can be present in either the
63instance or the service (with the instance one overriding in the case both are
64present) and that multiple instances can be created for a service with the
65potential to specialize all the properties/methods.
66
67-->
68
69<service_bundle type='manifest' name='SUNWiscsir:iscsi-initiator'>
70
71<service
72    name='network/iscsi/initiator'
73    type='service'
74    version='1'>
75
76    <single_instance/>
77
78    <dependency
79        name='net'
80        grouping='require_all'
81        restart_on='none'
82        type='service'>
83        <service_fmri value='svc:/network/service' />
84    </dependency>
85
86    <dependency
87        name='loopback'
88        grouping='require_any'
89        restart_on='error'
90        type='service'>
91        <service_fmri value='svc:/network/loopback' />
92    </dependency>
93
94	<!--
95	   Set a timeout of -1 to signify to inetd that we don't want
96	   to timeout this service, since the forked process is the
97	   one that does the services work. This is the case for most/all
98	   legacy inetd services; for services written to take advantage
99	   of Greenlines capabilities, the start method should fork
100	   off a process to handle the request and return a success code.
101	-->
102	<exec_method
103		type='method'
104		name='start'
105		exec='/lib/svc/method/iscsi-initiator'
106		timeout_seconds='600'>
107		<method_context>
108			<method_credential
109			user='root'
110			group='root'
111			privileges='basic,sys_devices'
112			/>
113		</method_context>
114	</exec_method>
115
116	<exec_method
117		type='method'
118		name='stop'
119		exec=':kill'
120		timeout_seconds='600'>
121		<method_context>
122			<method_credential
123			user='root'
124			group='root'
125			privileges='basic,sys_devices'
126			/>
127		</method_context>
128	</exec_method>
129
130	<!--
131	    Create an enabled instance.
132	-->
133	<instance
134        name='default'
135        enabled='true' >
136	</instance>
137
138	<stability value='Evolving' />
139
140	<template>
141		<common_name>
142			<loctext xml:lang='C'>
143				iSCSI initiator daemon
144			</loctext>
145		</common_name>
146
147		<documentation>
148			<manpage
149				title='iscsi'
150				section='7D'
151				manpath='/usr/share/man' />
152		</documentation>
153	</template>
154</service>
155
156</service_bundle>
157