Print this page
6864993 HA-xVM validate messages need to be wrapped by gettext
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/cmd/ha-services/gds-agents/xvm/validate_xvm.ksh
+++ new/usr/src/cmd/ha-services/gds-agents/xvm/validate_xvm.ksh
1 1 #!/usr/bin/ksh
2 2 #
3 3 # CDDL HEADER START
4 4 #
5 5 # The contents of this file are subject to the terms of the
6 6 # Common Development and Distribution License (the License).
7 7 # You may not use this file except in compliance with the License.
8 8 #
9 9 # You can obtain a copy of the license at usr/src/CDDL.txt
10 10 # or http://www.opensolaris.org/os/licensing.
11 11 # See the License for the specific language governing permissions
12 12 # and limitations under the License.
13 13 #
14 14 # When distributing Covered Code, include this CDDL HEADER in each
15 15 # file and include the License file at usr/src/CDDL.txt.
16 16 # If applicable, add the following below this CDDL HEADER, with the
17 17 # fields enclosed by brackets [] replaced with your own identifying
18 18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 19 #
20 20 # CDDL HEADER END
21 21 #
22 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
|
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
23 23 # Use is subject to license terms.
24 24 #
25 25 #ident "%Z%%M% %I% %E% SMI"
26 26 #
27 27
28 28 MYNAME=$(basename ${0})
29 29 MYDIR=$(dirname ${0})
30 30 METHOD="validate"
31 31 MACH="$(/usr/bin/uname -p)"
32 32
33 +typeset -rx TEXTDOMAIN=SUNW_SC_XVM
34 +typeset -rx TEXTDOMAINDIR=/opt/SUNWscxvm/lib/locale
35 +
33 36 case "${MACH}" in
34 37 i386*)
35 38 VM=xvm
36 39 PROPS="Domain_name Migration_type Plugin_probe Debug_level"
37 40 ;;
38 41 sparc*)
39 42 VM=ldom
40 43 PROPS="Domain_name Migration_type Plugin_probe Password_file Debug_level"
41 44 ;;
42 45 *)
43 46 ;;
44 47 esac
45 48
46 49 . ${MYDIR}/functions
47 50
48 51 typeset opt
49 52 typeset -i rc=0
50 53 typeset -i update=0
51 54
52 55 while getopts 'cur:x:X:g:R:G:T:' opt
53 56 do
54 57 case "${opt}" in
55 58 u) # set update
56 59 update=1
57 60 ;;
58 61 x) # Extension properties
59 62 property_key=$(echo ${OPTARG} | ${AWK} -F= '{print $1}' | ${TR} [a-z] [A-Z])
60 63 property_value=$(echo ${OPTARG} | ${AWK} -F= '{print $2}')
61 64
62 65 case "${property_key}" in
63 66 DOMAIN_NAME) DOMAIN=${property_value};;
64 67 MIGRATION_TYPE) MIGRATION_TYPE=${property_value};;
65 68 PLUGIN_PROBE) PLUGIN_PROBE=${property_value};;
66 69 PASSWORD_FILE) PASSWORD_FILE=${property_value};;
67 70 DEBUG_LEVEL) DEBUG_LEVEL=${property_value};;
68 71 esac
69 72 ;;
70 73
71 74 X) # Per_node extension properties
72 75 ;;
73 76
74 77 g) # Resource group properties
75 78 ;;
76 79
77 80 R) RESOURCE=${OPTARG};;
78 81
79 82 G) RESOURCEGROUP=${OPTARG};;
80 83
81 84 T) RESOURCETYPE=${OPTARG};;
82 85
83 86 esac
84 87 done
85 88
86 89 if [[ ${update} == 1 ]]
87 90 then
88 91 if ! get_properties ${PROPS}
89 92 then
90 93 debug_message "Method: $(basename ${0}) - End (Exit 1)"
91 94 exit 1
92 95 fi
93 96 fi
94 97
95 98 debug_message "Method: $(basename ${0}) - Begin"
96 99 $SET_DEBUG
97 100
98 101 if ! validate
99 102 then
100 103 debug_message "Method: $(basename ${0}) - End (Exit 1)"
101 104 exit 1
102 105 fi
103 106
104 107 debug_message "Method: $(basename ${0}) - End (Exit 0)"
105 108
106 109 exit 0
|
↓ open down ↓ |
64 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX