1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
   2 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
   3 
   4 <!--
   5  CDDL HEADER START
   6 
   7  The contents of this file are subject to the terms of the
   8  Common Development and Distribution License (the "License").
   9  You may not use this file except in compliance with the License.
  10 
  11  You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  12  or http://www.opensolaris.org/os/licensing.
  13  See the License for the specific language governing permissions
  14  and limitations under the License.
  15 
  16  When distributing Covered Code, include this CDDL HEADER in each
  17  file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  18  If applicable, add the following below this CDDL HEADER, with the
  19  fields enclosed by brackets "[]" replaced with your own identifying
  20  information: Portions Copyright [yyyy] [name of copyright owner]
  21 
  22  CDDL HEADER END
  23 
  24  Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  25  Use is subject to license terms.
  26 -->
  27 
  28 <service_bundle type="manifest" name="service_depends_041">
  29 <service name="TEST_SERVICE" type="service" version="1">
  30 <instance name="TEST_INSTANCE1" enabled="true">
  31 <!--
  32         This is the dependency that is going to be created
  33 <dependency name="adepc"
  34         grouping="require_all"
  35         restart_on="refresh"
  36         type="service"
  37         delete="false"
  38 >
  39 <service_fmri value="svc:/TEST_SERVICE:TEST_INSTANCE3" />
  40 </dependency>
  41 -->
  42 
  43 <exec_method type="method" name="start"
  44         exec="%{cfg/cmd} -l %{cfg/log} -f %{cfg/state} -s %s -i %i -m %m"
  45         timeout_seconds="100" />
  46 <exec_method type="method" name="stop"
  47         exec="%{cfg/cmd} -l %{cfg/log} -f %{cfg/state} -s %s -i %i -m %m"
  48         timeout_seconds="100" />
  49 <property_group name="cfg" type="application">
  50 <property name="cmd" type="astring">
  51 <astring_list>
  52 <value_node value="SERVICE_APP" />
  53 </astring_list>
  54 </property>
  55 <property name="log" type="astring">
  56 <astring_list>
  57 <value_node value="LOGFILE" />
  58 </astring_list>
  59 </property>
  60 <property name="state" type="astring">
  61 <astring_list>
  62 <value_node value="STATEFILE1" />
  63 </astring_list>
  64 </property>
  65 </property_group>
  66 </instance>
  67 <instance name="TEST_INSTANCE2" enabled="true">
  68 <dependency name="bdepa"
  69         grouping="require_all"
  70         restart_on="refresh"
  71         type="service"
  72         delete="false"
  73 >
  74 <service_fmri value="svc:/TEST_SERVICE:TEST_INSTANCE1" />
  75 </dependency>
  76 <exec_method type="method" name="start"
  77         exec="%{cfg/cmd} -l %{cfg/log} -f %{cfg/state} -s %s -i %i -m %m"
  78         timeout_seconds="100" />
  79 <exec_method type="method" name="stop"
  80         exec="%{cfg/cmd} -l %{cfg/log} -f %{cfg/state} -s %s -i %i -m %m"
  81         timeout_seconds="100" />
  82 <property_group name="cfg" type="application">
  83 <property name="cmd" type="astring">
  84 <astring_list>
  85 <value_node value="SERVICE_APP" />
  86 </astring_list>
  87 </property>
  88 <property name="log" type="astring">
  89 <astring_list>
  90 <value_node value="LOGFILE" />
  91 </astring_list>
  92 </property>
  93 <property name="state" type="astring">
  94 <astring_list>
  95 <value_node value="STATEFILE2" />
  96 </astring_list>
  97 </property>
  98 </property_group>
  99 </instance>
 100 <instance name="TEST_INSTANCE3" enabled="true">
 101 <dependency name="cdepb"
 102         grouping="require_all"
 103         restart_on="refresh"
 104         type="service"
 105         delete="false"
 106 >
 107 <service_fmri value="svc:/TEST_SERVICE:TEST_INSTANCE2" />
 108 </dependency>
 109 <exec_method type="method" name="start"
 110         exec="%{cfg/cmd} -l %{cfg/log} -f %{cfg/state} -s %s -i %i -m %m"
 111         timeout_seconds="100" />
 112 <exec_method type="method" name="stop"
 113         exec="%{cfg/cmd} -l %{cfg/log} -f %{cfg/state} -s %s -i %i -m %m"
 114         timeout_seconds="100" />
 115 <property_group name="cfg" type="application">
 116 <property name="cmd" type="astring">
 117 <astring_list>
 118 <value_node value="SERVICE_APP" />
 119 </astring_list>
 120 </property>
 121 <property name="log" type="astring">
 122 <astring_list>
 123 <value_node value="LOGFILE" />
 124 </astring_list>
 125 </property>
 126 <property name="state" type="astring">
 127 <astring_list>
 128 <value_node value="STATEFILE3" />
 129 </astring_list>
 130 </property>
 131 </property_group>
 132 </instance>
 133 </service>
 134 </service_bundle>