4 #
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the License).
7 # You may not use this file except in compliance with the License.
8 #
9 # You can obtain a copy of the license at usr/src/CDDL.txt
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
13 #
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/CDDL.txt.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets [] replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 #
20 # CDDL HEADER END
21 #
22
23 #
24 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
26 #
27
28 #ident "%Z%%M% %I% %E% SMI"
29
30 MYDIR=/opt/SUNWscPostgreSQL
31 MYFILE=
32 MYCONFIG=
33 MANIFEST_DIR=/var/svc/manifest/application/sczone-agents
34
35 MYNAME=`basename ${0}`
36
37 . ${MYDIR}/etc/config
38 . ${MYDIR}/lib/functions_static
39 . ${MYDIR}/bin/functions
40
41
42 #############################################################
43 # create_xml()
44 #
49 # Sun Cluster Data Service for Solaris Container
50 # - sczsmf component
51 #
52 #############################################################
53
54 create_xml()
55 {
56 MYDIR=$1
57 MYFILE=$2
58
59 if [ ! -d "${MANIFEST_DIR}" ]
60 then
61 mkdir -p ${MANIFEST_DIR}
62 fi
63
64 cat > ${MANIFEST_DIR}/${MYFILE}.xml <<-EOF
65 <?xml version="1.0"?>
66 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
67
68 <!--
69 Copyright 2006 Sun Microsystems, Inc. All rights reserved.
70 Use is subject to license terms.
71
72 -->
73
74 <service_bundle type='manifest' name='${MYFILE}'>
75
76 <service
77 name='application/sczone-agents'
78 type='service'
79 version='1'>
80
81 <!--
82 Common dependencies for the service
83 -->
84
85 <dependency name='pgs_services'
86 grouping='require_all'
87 restart_on='none'
88 type='service'>
89 <service_fmri value='svc:/milestone/multi-user-server'/>
90 <service_fmri value='svc:/network/loopback'/>
91 <service_fmri value='svc:/network/physical'/>
92 </dependency>
93
94 <instance name='${MYFILE}' enabled='false'>
95
96
97 <exec_method
98 type='method'
99 name='start'
100 exec='${MYDIR}/bin/control_pgs start'
101 timeout_seconds='300' >
102 <method_context project='${PROJECT}' >
103 <method_credential user='${USER}' />
104 </method_context>
105 </exec_method>
106
107 <exec_method
108 type='method'
109 name='stop'
110 exec='${MYDIR}/bin/control_pgs stop'
111 timeout_seconds='300' >
|
4 #
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the License).
7 # You may not use this file except in compliance with the License.
8 #
9 # You can obtain a copy of the license at usr/src/CDDL.txt
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
13 #
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/CDDL.txt.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets [] replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 #
20 # CDDL HEADER END
21 #
22
23 #
24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
25 # Use is subject to license terms.
26 #
27
28 #ident "%Z%%M% %I% %E% SMI"
29
30 MYDIR=/opt/SUNWscPostgreSQL
31 MYFILE=
32 MYCONFIG=
33 MANIFEST_DIR=/var/svc/manifest/application/sczone-agents
34
35 MYNAME=`basename ${0}`
36
37 . ${MYDIR}/etc/config
38 . ${MYDIR}/lib/functions_static
39 . ${MYDIR}/bin/functions
40
41
42 #############################################################
43 # create_xml()
44 #
49 # Sun Cluster Data Service for Solaris Container
50 # - sczsmf component
51 #
52 #############################################################
53
54 create_xml()
55 {
56 MYDIR=$1
57 MYFILE=$2
58
59 if [ ! -d "${MANIFEST_DIR}" ]
60 then
61 mkdir -p ${MANIFEST_DIR}
62 fi
63
64 cat > ${MANIFEST_DIR}/${MYFILE}.xml <<-EOF
65 <?xml version="1.0"?>
66 <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
67
68 <!--
69 Copyright 2008 Sun Microsystems, Inc. All rights reserved.
70 Use is subject to license terms.
71
72 -->
73
74 <service_bundle type='manifest' name='${MYFILE}'>
75
76 <service
77 name='application/sczone-agents'
78 type='service'
79 version='1'>
80
81 <!--
82 Common dependencies for the service
83 -->
84
85 <dependency name='pgs_services'
86 grouping='require_all'
87 restart_on='none'
88 type='service'>
89 <service_fmri value='svc:/milestone/multi-user-server'/>
90 <service_fmri value='svc:/network/loopback'/>
91 </dependency>
92
93 <instance name='${MYFILE}' enabled='false'>
94
95
96 <exec_method
97 type='method'
98 name='start'
99 exec='${MYDIR}/bin/control_pgs start'
100 timeout_seconds='300' >
101 <method_context project='${PROJECT}' >
102 <method_credential user='${USER}' />
103 </method_context>
104 </exec_method>
105
106 <exec_method
107 type='method'
108 name='stop'
109 exec='${MYDIR}/bin/control_pgs stop'
110 timeout_seconds='300' >
|