+++ /dev/null
---- EMCpower-5.0.0/PowerPath.rhel 2007-02-07 10:06:21.000000000 +0200
-+++ EMCpower-5.0.0/PowerPath 2007-05-29 15:39:50.764904063 +0300
-@@ -1,5 +1,6 @@
- #!/bin/sh
- #
-+# chkconfig: 2345 02 98
- # description: Loads and configures the EMC PowerPath drivers.
- #
- # ###################################################################
-@@ -15,6 +16,9 @@
-
- # @(#) $Header$
-
-+# Source function library.
-+. /etc/rc.d/init.d/functions
-+
-
- # Functions to preserve exceptional command status return values
-
-@@ -39,10 +43,10 @@
- then
- case "$rc_script_stat" in
- 0)
-- echo "`eval_gettext \" done\"`"
-+ ok
- ;;
- *)
-- echo "`eval_gettext \" failed\"`"
-+ fail
- ;;
- esac
- fi
-@@ -68,32 +72,13 @@
- # @(#) $Header$
-
- PATH=/usr/bin/:/bin:/sbin:/usr/sbin
--PPBASE=/etc/opt/emcpower/EMCpower.LINUX-5.0.0
-
- # the following are the internationalization specific lines
--
--if [ ! -x /usr/bin/gettext ]; then
--gettext()
--{
-- echo $*
--}
--eval_gettext()
--{
-- eval "echo $*"
--}
--
--else
--. gettext.sh
- TEXTDOMAIN=PowerPath
- export TEXTDOMAIN
--TEXTDOMAINDIR=$PPBASE/i18n/catalog
--
--export TEXTDOMAINDIR
- export RPM_INSTALL_PREFIX
--fi
- # end of internationalization
-
--
- pp_stop_lvm()
- {
- if test -x /sbin/vgchange -a -x /sbin/vgscan ; then
-@@ -106,19 +91,19 @@
- err_stop=`/sbin/vgchange -a n $i 2>&1 | grep "open logical volume"`
- if [ "$err_stop" != "" ]; then
- if [ "$open_vol" = "" ]; then
-- echo "`eval_gettext \"Following LVM volume groups are in use:\"`"
-+ nls "Following LVM volume groups are in use:"
- open_vol=$err_stop
- fi
- var1=$i
- var2=`echo $pv`
-- echo "`eval_gettext \" Volume Group: \\$var1 (\\$var2)\"`"
-+ echo "`nls " Volume Group: \\$var1 (\\$var2)"`"
- fi
- fi
- done
- fi
- if [ "$open_vol" != "" ]; then
-- echo "`eval_gettext \"These open logical volume devices use LUNs from Powerpath managed devices,\"`"
-- echo "`eval_gettext \"Please re-issue the command after closing these volumes.\"`"
-+ nls "These open logical volume devices use LUNs from Powerpath managed devices,"
-+ nls "Please re-issue the command after closing these volumes."
- return 1
- fi
- return 0
-@@ -154,9 +139,9 @@
- rc_check
-
- if rc_status ; then
-- echo -e "`eval_gettext \"\nSuccessfully started 32-bit emulation library\"`"
-+ nls "\nSuccessfully started 32-bit emulation library"
- else
-- echo -e "`eval_gettext \"\nError in starting 32-bit emulation library\"`"
-+ nls "\nError in starting 32-bit emulation library"
- fi
- }
-
-@@ -166,7 +151,7 @@
- {
- if [ -f /etc/emcp_devicesDB.dat ]; then
- if [ -f /etc/emcp_devicesDB.idx ]; then
-- /etc/opt/emcpower/emcpmgr map -p > /dev/null 2>&1
-+ /sbin/emcpmgr map -p > /dev/null 2>&1
- rc_check
- fi
- fi
-@@ -206,9 +191,9 @@
-
- /sbin/powermt load > /dev/null 2>&1
- rc_check
-- /etc/opt/emcpower/emcpmgr map > /dev/null 2>&1
-+ /sbin/emcpmgr map > /dev/null 2>&1
- rc_check
-- /etc/opt/emcpower/powercf -C > /dev/null 2>&1
-+ /sbin/powercf -C > /dev/null 2>&1
- /sbin/powermt save > /dev/null 2>&1
- rc_check
- /sbin/powermt register > /dev/null 2>&1
-@@ -224,15 +209,15 @@
- {
- ps -C naviagent >> /dev/null
- if [ $? -eq 0 ]; then
-- echo "`eval_gettext \"Navisphere agent is running.\"`"
-- echo "`eval_gettext \"Please stop the agent and then re-issue \\$script_name stop.\"`"
-+ nls "Navisphere agent is running."
-+ eval echo "$(nls \"Please stop the agent and then re-issue \\$script_name stop.\")"
- return 1
- fi
-
- ps -C powermt >> /dev/null
- if [ $? -eq 0 ]; then
-- echo "`eval_gettext \"The powermt command is running.\"`"
-- echo "`eval_gettext \"Please stop powermt and then re-issue \\$script_name stop.\"`"
-+ nls "The powermt command is running."
-+ echo "`eval nls \"Please stop powermt and then re-issue \\$script_name stop.\"`"
- return 1
- fi
-
-@@ -240,8 +225,8 @@
- if [ $? -eq 0 ]; then
- echo "$mig_info" | grep 'No migrations found' > /dev/null
- if test $? -ne 0 ; then
-- echo "`eval_gettext \"PowerPath migrations are present.\"`"
-- echo "`eval_gettext \"Please cleanup the migrations and then re-issue \\$script_name stop.\"`"
-+ nls "PowerPath migrations are present."
-+ eval echo "$(nls "Please cleanup the migrations and then re-issue \\$script_name stop.")"
- return 1
- fi
- fi
-@@ -261,7 +246,7 @@
- /sbin/modprobe -q -s --first-time $d
- rc_check
- if [ $? -ne 0 ] ; then
-- echo "`eval_gettext \"PowerPath could not load module \\$d\"`"
-+ echo "`eval nls \"PowerPath could not load module \\$d\"`"
- break
- fi
- done
-@@ -318,8 +303,8 @@
- else
- sleep 5
- retry=`expr $retry - 1`
-- #echo "`eval_gettext \"PowerPath devices are open.\"`"
-- #echo "`eval_gettext \"Please close these devices and then re-issue \\$script_name stop.\"`"
-+ #nls "PowerPath devices are open."
-+ #eval echo "$(nls "Please close these devices and then re-issue \$script_name stop.")"
- #/bin/false
- #uerr=$?
- #return $uerr
-@@ -334,14 +319,14 @@
- uerr=$?
- return $uerr
- else
-- echo "`eval_gettext \"PowerPath devices are open.\"`"
-- echo "`eval_gettext \"Please close these devices and then re-issue \\$script_name stop.\"`"
-+ nls "PowerPath devices are open."
-+ eval echo "$(nls "Please close these devices and then re-issue \$script_name stop.")"
- /bin/false
- uerr=$?
- return $uerr
- fi
-
-- echo "`eval_gettext \"PowerPath could not unload PowerPath modules.\"`"
-+ nls "PowerPath could not unload PowerPath modules."
- uerr=1
- return $uerr
- }
-@@ -358,20 +343,19 @@
- mknod /dev/emcpower c $mmaj $mmin > /dev/null
-
- if [ $? -ne 0 ]; then
-- echo "`eval_gettext \"failed to create emcpower device\"`"
-+ nls "failed to create emcpower device"
- fi
-
- }
-
- rc_reset
- script_name=PowerPath
--ext=$PPBASE/bin/.drivers_ext
--mgr=$PPBASE/bin/.drivers_mgr
-+ext=/etc/emc/.drivers_ext
-+mgr=/etc/emc/.drivers_mgr
-
- case "$1" in
- start)
--
-- echo -n "`eval_gettext \"Starting \\$script_name: \"`"
-+ msg_starting "PowerPath"
-
- ###
- # Start the 32-bit emulation for ia64
-@@ -387,7 +371,7 @@
- lsmod | grep -w '^emcp' > /dev/null
- if [ $? -ne 0 ]; then
- load_drivers
-- else
-+ else
- if dev_emcpower_is_back 60; then
- recreate_emcpower_device
- /etc/opt/emcpower/powercf -K > /dev/null 2>&1
-@@ -396,10 +380,10 @@
- rc_check
- unload_drivers
- fi
-- # remove PIOC if it was loaded during RD boot.
-- lsmod | grep emcpioc > /dev/null
-- if [ $? -eq 0 ]; then
-- /sbin/rmmod emcpioc > /dev/null
-+ # remove PIOC if it was loaded during RD boot.
-+ lsmod | grep emcpioc > /dev/null
-+ if [ $? -eq 0 ]; then
-+ /sbin/rmmod emcpioc > /dev/null
- fi
- fi
-
-@@ -411,7 +395,7 @@
- unload_drivers
- fi
- else
-- echo "`eval_gettext \"PowerPath: unable to load PowerPath modules.\"`"
-+ nls "PowerPath: unable to load PowerPath modules."
- unload_drivers
- fi
- fi
-@@ -419,11 +403,10 @@
- ;;
-
- stop)
-- echo -n "`eval_gettext \"Stopping \\$script_name: \"`"
-+ msg_stopping "PowerPath"
- lsmod | grep -w '^emcp' > /dev/null
-- if test $? -ne 0 ;
-- then
-- echo "`eval_gettext \"PowerPath is not running\"`"
-+ if test $? -ne 0; then
-+ nls "PowerPath is not running"
- else
- #
- # Tresspass can happen if new devices are added or some devices
-@@ -436,7 +419,7 @@
- if ok_to_stop; then
- /sbin/powermt save > /dev/null 2>&1
- rc_check
-- /etc/opt/emcpower/emcpmgr unmap > /dev/null 2>&1
-+ /sbin/emcpmgr unmap > /dev/null 2>&1
- rc_check
- /sbin/powermt remove dev=all 2> /var/tmp/.pp_exit
- devr=$?
-@@ -451,21 +434,21 @@
- unload_drivers
- rc_check
- if [ $? -ne 0 ] ; then
-- echo "`eval_gettext \"PowerPath could not unload PowerPath modules.\"`"
-+ nls "PowerPath could not unload PowerPath modules."
- fi
- else
- if [ $cdevs -eq 0 -o $zerolen -eq 0 ] ; then
- unload_drivers
- rc_check
- if [ $? -ne 0 ] ; then
-- echo "`eval_gettext \"PowerPath could not unload PowerPath modules.\"`"
-+ nls "PowerPath could not unload PowerPath modules."
- fi
- else
-- echo "`eval_gettext \"PowerPath devices are open.\"`"
-- echo "`eval_gettext \"Please close these devices and then re-issue \\$script_name stop.\"`"
-- /etc/opt/emcpower/emcpmgr map -p > /dev/null 2>&1
-+ nls "PowerPath devices are open."
-+ eval echo "$(nls "Please close these devices and then re-issue \$script_name stop.")"
-+ /sbin/emcpmgr map -p > /dev/null 2>&1
- /sbin/powermt config > /dev/null 2>&1
-- /sbin/powermt load > /dev/null 2>&1
-+ /sbin/powermt load > /dev/null 2>&1
- /bin/false
- fi
- fi
-@@ -476,9 +459,10 @@
- rc_status -v
- ;;
- *)
-- var=$0
-- echo "`eval_gettext \"Usage: \\$var {start|stop}\"`"
-+ msg_usage "$0 {start|stop}"
-+ exit 3
- ;;
- esac
-
- rc_exit
-+# vim:ts=4:sw=4:et