Commit 8d6987f remove duplicated functions

1 file Authored and Committed by lilin a year ago
remove duplicated functions

    
 1 @@ -50,24 +50,6 @@
 2       Cmd "modprobe -r scsi_debug"
 3   }
 4   
 5 - 
 6 - # ---------------------------------------------------------#
 7 - # Mutipath_installation()
 8 - # Usage:
 9 - # check if multipath starts, if not install it with yum
10 - # Parameter:
11 - #   NULL
12 - # Returns:
13 - #   Return code:
14 - #       0 on success
15 - #       1 if something went wrong.
16 - # ---------------------------------------------------------#
17 - function Multipath_installation (){
18 -     Cmd "rpm -qi device-mapper-multipath" && return 0
19 -     Cmd "yum install -y device-mapper-multipath"
20 - }
21 - 
22 - 
23   # ---------------------------------------------------------#
24   # Print_kernel_info()
25   # Usage:
26 @@ -84,22 +66,6 @@
27   }
28   
29   
30 - # ---------------------------------------------------------#
31 - # Print_multipath_pkginfo()()
32 - # Usage:
33 - # print the multipath pacakge information
34 - # Parameter:
35 - #   NULL
36 - # Returns:
37 - #   Return code:
38 - #       0 on success
39 - #       1 if something went wrong.
40 - # ---------------------------------------------------------#
41 - function Print_multipath_pkginfo (){
42 -     Cmd "rpm -qi device-mapper-multipath"
43 -     Cmd "rpm -qi kpartx"
44 - }
45 - 
46   
47   # ---------------------------------------------------------#
48   # Setup_Multipath ()
49 @@ -229,32 +195,3 @@
50   } #end of functoin Setup_Multipath
51   
52   
53 - get_wwid_of_disk()
54 - {
55 - # we should not use scsi_id or /dev/disk/by-id to get the wwid
56 - # since multipath could replace the white spaces of wwid if
57 - # having white spaces. we should use
58 - # multipathd show paths format %w %d
59 - # to get the wwid
60 - 
61 -     for dev in `ls /dev/disk/by-id/*`
62 -     do
63 -         if readlink $dev | grep -qw "$disk$"
64 -         then
65 -             wwid=$(basename $dev | sed 's/^[^-]*-//g')
66 -             break
67 -         fi
68 -     done
69 -     if test X$wwid = X
70 -     then
71 -         wwid=$(/lib/udev/scsi_id --page=0x83 --whitelisted --device=/dev/$disk)
72 -     fi
73 -     echo $wwid
74 - 
75 - #    multipathd_running || texit "multipathd is not running"
76 - #    local disk=$1
77 - #    local wwid=$(multipathd show paths format %d,%w | grep "^$disk\s*," | \
78 - #        awk -F, '{ print $2 }' | sed 's/\s//g')
79 - #    echo $wwid
80 - }
81 -