1 #!/usr/bin/ksh
2 #
3 # CDDL HEADER START
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 # ident "%Z%%M% %I% %E% SMI"
28 #
29
30 # starts the zone, the paramters are passed in options
31
32 MYNAME=`basename ${0}`
33 MYDIR=`dirname ${0}`
34
35 # needed for backwards compatibility
36 Zonebrand="native"
37
38 typeset opt
39
40 while getopts 'R:G:P:' opt
41 do
42 case "${opt}" in
43 R) RESOURCE=${OPTARG};;
44 G) RESOURCEGROUP=${OPTARG};;
45 P) PARDIR=${OPTARG};;
46 *) exit 1;;
47 esac
48 done
49
50 . ${MYDIR}/../etc/config # debugging flags
51 . ${MYDIR}/functions # agent specific functions
52 . ${MYDIR}/../../lib/functions # functions common for all the agents
53 . ${MYDIR}/../../lib/functions_common # functions common for all the zone components
54
55 debug_message "Method: ${MYNAME} - Begin"
56 ${SET_DEBUG}
57
58 # Checks the syntax of the options
59
60 if ! validate_options
61 then
62 debug_message "Method: ${MYNAME} - End (Exit 1)"
63 exit 1
64 fi
65
66 rm ${LOGFILE} 2>/dev/null
67
68 # checks the semantic of the options and the parameter file
69
70 if ! validate
71 then
72 debug_message "Method: ${MYNAME} - End (Exit 1)"
73 exit 1
74 fi
75
76 # source the zone boot specific parameter file
77
78 . ${PARFILE}
79
80 if start_sczbt
81 then
82 log_message notice "start_command rc<${rc_start_command}>"
83 else
84 log_message err "start_command rc<${rc_start_command}>"
85 fi
86
87 debug_message "Method: ${MYNAME} - End (Exit ${rc_start_command})"
88 exit ${rc_start_command}
--- EOF ---