]> git.pld-linux.org Git - packages/EMCpower.git/blob - EMCpower-init.patch
- start update to 5.0.0
[packages/EMCpower.git] / EMCpower-init.patch
1 --- EMCpower-5.0.0/PowerPath~   2007-02-07 10:06:21.000000000 +0200
2 +++ EMCpower-5.0.0/PowerPath    2006-09-04 16:10:03.000000000 +0300
3 @@ -15,6 +15,9 @@
4  
5  # @(#) $Header$
6  
7 +# Source function library.
8 +. /etc/rc.d/init.d/functions
9 +
10  
11  # Functions to preserve exceptional command status return values
12  
13 @@ -39,10 +42,10 @@
14          then
15          case "$rc_script_stat" in
16              0)
17 -              echo "`eval_gettext \" done\"`"
18 +                         nls " done"
19                ;;
20              *)
21 -              echo "`eval_gettext \" failed\"`"
22 +                         nls " failed"
23                ;;
24          esac
25      fi
26 @@ -106,19 +109,19 @@
27                          err_stop=`/sbin/vgchange -a n $i  2>&1 | grep "open logical volume"`
28                          if [ "$err_stop" != "" ]; then
29                                  if [ "$open_vol" = "" ]; then
30 -                                        echo "`eval_gettext \"Following LVM volume groups are in use:\"`"
31 +                                                                               nls "Following LVM volume groups are in use:"
32                                          open_vol=$err_stop
33                                  fi
34                         var1=$i
35                         var2=`echo $pv`
36 -                        echo "`eval_gettext \"      Volume Group: \\$var1 (\\$var2)\"`"
37 +                        echo "`nls "      Volume Group: \\$var1 (\\$var2)"`"
38                          fi
39                  fi
40          done
41      fi
42          if [ "$open_vol" != "" ]; then
43 -            echo "`eval_gettext \"These open logical volume devices use LUNs from Powerpath managed devices,\"`"
44 -            echo "`eval_gettext \"Please re-issue the command after closing these volumes.\"`"
45 +                       nls "These open logical volume devices use LUNs from Powerpath managed devices,"
46 +                       nls "Please re-issue the command after closing these volumes."
47         return 1
48          fi
49   return 0
50 @@ -154,9 +157,9 @@
51      rc_check
52  
53      if rc_status ; then
54 -        echo -e "`eval_gettext \"\nSuccessfully started 32-bit emulation library\"`"
55 +       nls "\nSuccessfully started 32-bit emulation library"
56      else
57 -        echo -e "`eval_gettext \"\nError in starting 32-bit emulation library\"`"
58 +       nls "\nError in starting 32-bit emulation library"
59      fi
60  }
61  
62 @@ -166,8 +169,8 @@
63  {
64      if [ -f /etc/emcp_devicesDB.dat ]; then 
65          if [ -f /etc/emcp_devicesDB.idx ]; then
66 -            /etc/opt/emcpower/emcpmgr map -p > /dev/null 2>&1
67 +            /sbin/emcpmgr map -p > /dev/null 2>&1
68              rc_check
69          fi
70      fi
71  
72 @@ -206,10 +209,10 @@
73  
74      /sbin/powermt load         > /dev/null 2>&1
75      rc_check
76 -    /etc/opt/emcpower/emcpmgr map      > /dev/null 2>&1
77 +    /sbin/emcpmgr map  > /dev/null 2>&1
78      rc_check
79 -    /etc/opt/emcpower/powercf -C       > /dev/null 2>&1
80 +    /sbin/powercf -C   > /dev/null 2>&1
81      /sbin/powermt save         > /dev/null 2>&1
82      rc_check
83      /sbin/powermt register     > /dev/null 2>&1
84      rc_check
85 @@ -224,14 +227,14 @@
86  {
87      ps -C naviagent >> /dev/null
88      if [ $? -eq 0 ]; then
89 -        echo "`eval_gettext \"Navisphere agent is running.\"`"
90 -        echo  "`eval_gettext \"Please stop the agent and then re-issue \\$script_name stop.\"`"
91 +       nls "Navisphere agent is running."
92 +        eval echo "$(nls \"Please stop the agent and then re-issue \\$script_name stop.\")"
93          return 1
94      fi
95  
96      ps -C powermt >> /dev/null
97      if [ $? -eq 0 ]; then
98 -        echo "`eval_gettext \"The powermt command is running.\"`"
99 -        echo "`eval_gettext \"Please stop powermt and then re-issue \\$script_name stop.\"`"
100 +       nls "The powermt command is running."
101 +        echo "`eval nls \"Please stop powermt and then re-issue \\$script_name stop.\"`"
102          return 1
103      fi
104 @@ -260,6 +263,6 @@
105          /sbin/modprobe -q -s --first-time $d
106          rc_check
107          if [ $? -ne 0 ] ; then
108 -            echo "`eval_gettext \"PowerPath could not load module \\$d\"`"
109 +            echo "`eval nls \"PowerPath could not load module \\$d\"`"
110              break
111          fi
112 @@ -288,8 +291,8 @@
113  
114  case "$1" in
115      start)
116  
117 -        echo -n "`eval_gettext \"Starting \\$script_name: \"`"
118 +        eval echo -n "$(nls "Starting \$script_name: ")"
119  
120          ###
121          # Start the 32-bit emulation for ia64
122 @@ -411,7 +414,7 @@
123                      unload_drivers
124                  fi
125              else
126 -                echo "`eval_gettext \"PowerPath: unable to load PowerPath modules.\"`"
127 +                               nls "PowerPath: unable to load PowerPath modules."
128                  unload_drivers
129              fi
130          fi
131 @@ -419,11 +422,11 @@
132          ;;
133  
134      stop)
135 -        echo -n "`eval_gettext \"Stopping \\$script_name: \"`"
136 +        eval echo -n "$(nls "Stopping \$script_name: ")"
137          lsmod | grep -w '^emcp' > /dev/null
138          if test $? -ne 0 ;
139          then
140 -                echo "`eval_gettext \"PowerPath is not running\"`"
141 +                               nls "PowerPath is not running"
142          else
143              #
144              # Tresspass can happen if new devices are added or some devices 
145 @@ -436,9 +439,9 @@
146              if ok_to_stop; then
147                  /sbin/powermt save > /dev/null 2>&1
148                  rc_check
149 -                /etc/opt/emcpower/emcpmgr unmap > /dev/null 2>&1
150 +                /sbin/emcpmgr unmap > /dev/null 2>&1
151                  rc_check
152                  /sbin/powermt remove dev=all 2> /var/tmp/.pp_exit
153                  devr=$?
154                  cat /var/tmp/.pp_exit | grep "not found" > /dev/null 2>&1
155                  cdevs=$?
156 @@ -477,7 +480,7 @@
157          ;;
158      *)
159          var=$0
160 -       echo "`eval_gettext \"Usage: \\$var {start|stop}\"`"
161 +               eval echo "$(nls "Usage: \$var {start\|stop}")"
162         ;;
163  esac
164  
This page took 0.061894 seconds and 3 git commands to generate.