1 --- EMCpower-4.5.1/PowerPath.rhel 2006-05-31 16:22:19.000000000 +0300
2 --- EMCpower-4.5.1/PowerPath.rhel 2006-05-31 16:22:19.000000000 +0300
7 +# Source function library.
8 +. /etc/rc.d/init.d/functions
11 # Functions to preserve exceptional command status return values
15 case "$rc_script_stat" in
17 - echo "`eval_gettext \" done\"`"
21 - echo "`eval_gettext \" failed\"`"
27 PATH=/usr/bin/:/bin:/sbin:/usr/sbin
29 # the following are the internationalization specific lines
31 -if [ ! -x /usr/bin/gettext ]; then
45 -TEXTDOMAINDIR=$RPM_INSTALL_PREFIX/etc/opt/emcpower/EMCpower.LINUX-4.5.1/i18n/catalog
47 export RPM_INSTALL_PREFIX
49 # end of internationalization
54 if test -x /sbin/vgchange -a -x /sbin/vgscan ; then
56 err_stop=`/sbin/vgchange -a n $i 2>&1 | grep "open logical volume"`
57 if [ "$err_stop" != "" ]; then
58 if [ "$open_vol" = "" ]; then
59 - echo "`eval_gettext \"Following LVM volume groups are in use:\"`"
60 + nls "Following LVM volume groups are in use:"
65 - echo "`eval_gettext \" Volume Group: \\$var1 (\\$var2)\"`"
66 + echo "`nls " Volume Group: \\$var1 (\\$var2)"`"
71 if [ "$open_vol" != "" ]; then
72 - echo "`eval_gettext \"These open logical volume devices use LUNs from Powerpath managed devices,\"`"
73 - echo "`eval_gettext \"Please re-issue the command after closing these volumes.\"`"
74 + nls "These open logical volume devices use LUNs from Powerpath managed devices,"
75 + nls "Please re-issue the command after closing these volumes."
83 - echo -e "`eval_gettext \"\nSuccessfully started 32-bit emulation library\"`"
84 + nls "\nSuccessfully started 32-bit emulation library"
86 - echo -e "`eval_gettext \"\nError in starting 32-bit emulation library\"`"
87 + nls "\nError in starting 32-bit emulation library"
93 if [ -f /etc/emcp_devicesDB.dat ]; then
94 if [ -f /etc/emcp_devicesDB.idx ]; then
95 - /etc/opt/emcpower/emcpmgr map -p > /dev/null 2>&1
96 + /usr/sbin/emcpmgr map -p > /dev/null 2>&1
102 /sbin/powermt load > /dev/null 2>&1
104 - /etc/opt/emcpower/emcpmgr map > /dev/null 2>&1
105 + /usr/sbin/emcpmgr map > /dev/null 2>&1
107 - /etc/opt/emcpower/powercf -C > /dev/null 2>&1
108 + /usr/sbin/powercf -C > /dev/null 2>&1
109 /sbin/powermt save > /dev/null 2>&1
111 /sbin/powermt register > /dev/null 2>&1
112 @@ -213,15 +199,15 @@
114 ps -C naviagent >> /dev/null
115 if [ $? -eq 0 ]; then
116 - echo "`eval_gettext \"Navisphere agent is running.\"`"
117 - echo "`eval_gettext \"Please stop the agent and then re-issue \\$script_name stop.\"`"
118 + nls "Navisphere agent is running."
119 + eval echo "$(nls \"Please stop the agent and then re-issue \\$script_name stop.\")"
123 ps -C powermt >> /dev/null
124 if [ $? -eq 0 ]; then
125 - echo "`eval_gettext \"The powermt command is running.\"`"
126 - echo "`eval_gettext \"Please stop powermt and then re-issue \\$script_name stop.\"`"
127 + nls "The powermt command is running."
128 + echo "`eval nls \"Please stop powermt and then re-issue \\$script_name stop.\"`"
131 if pp_stop_lvm ; then
133 /sbin/modprobe -q -s --first-time $d
135 if [ $? -ne 0 ] ; then
136 - echo "`eval_gettext \"PowerPath could not load module \\$d\"`"
137 + echo "`eval nls \"PowerPath could not load module \\$d\"`"
141 @@ -261,12 +247,12 @@
144 script_name=PowerPath
145 -ext=/etc/opt/emcpower/EMCpower.LINUX-4.5.1/bin/.drivers_ext
146 +ext=/etc/emcpower/drivers_ext
151 - echo -n "`eval_gettext \"Starting \\$script_name: \"`"
152 + eval echo -n "$(nls "Starting \$script_name: ")"
155 # Start the 32-bit emulation for ia64
156 @@ -295,12 +281,12 @@
157 # These values can be different when PP loads from RD.
160 - mmaj=`cat /sys/class/misc/emcpower/dev | gawk -F : '{print $1}'`
161 - mmin=`cat /sys/class/misc/emcpower/dev | gawk -F : '{print $2}'`
162 + mmaj=`cat /sys/class/misc/emcpower/dev | awk -F : '{print $1}'`
163 + mmin=`cat /sys/class/misc/emcpower/dev | awk -F : '{print $2}'`
164 mknod /dev/emcpower c $mmaj $mmin > /dev/null
166 if [ $? -ne 0 ]; then
167 - echo "`eval_gettext \"failed to create emcpower device\"`"
168 + nls "failed to create emcpower device"
176 - echo "`eval_gettext \"PowerPath: unable to load PowerPath modules.\"`"
177 + nls "PowerPath: unable to load PowerPath modules."
181 @@ -319,11 +305,11 @@
185 - echo -n "`eval_gettext \"Stopping \\$script_name: \"`"
186 + eval echo -n "$(nls "Stopping \$script_name: ")"
187 lsmod | grep -w '^emcp' > /dev/null
190 - echo "`eval_gettext \"PowerPath is not running\"`"
191 + nls "PowerPath is not running"
194 # Tresspass can happen if new devices are added or some devices
197 /sbin/powermt save > /dev/null 2>&1
199 - /etc/opt/emcpower/emcpmgr unmap > /dev/null 2>&1
200 + /usr/sbin/emcpmgr unmap > /dev/null 2>&1
202 /sbin/powermt remove dev=all 2> /var/tmp/.pp_exit
204 @@ -347,19 +333,19 @@
207 if [ $? -ne 0 ] ; then
208 - echo "`eval_gettext \"PowerPath could not unload PowerPath modules.\"`"
209 + nls "PowerPath could not unload PowerPath modules."
212 if [ $cdevs -eq 0 ] ; then
215 if [ $? -ne 0 ] ; then
216 - echo "`eval_gettext \"PowerPath could not unload PowerPath modules.\"`"
217 + nls "PowerPath could not unload PowerPath modules."
220 - echo "`eval_gettext \"PowerPath devices are open.\"`"
221 - echo "`eval_gettext \"Please close these devices and then re-issue \\$script_name stop.\"`"
222 - /etc/opt/emcpower/emcpmgr map -p > /dev/null 2>&1
223 + nls "PowerPath devices are open."
224 + eval echo "$(nls "Please close these devices and then re-issue \$script_name stop.")"
225 + /usr/sbin/emcpmgr map -p > /dev/null 2>&1
226 /sbin/powermt config > /dev/null 2>&1
233 - echo "`eval_gettext \"Usage: \\$var {start|stop}\"`"
234 + eval echo "$(nls "Usage: \$var {start\|stop}")"