/[smeserver]/rpms/mkinitrd/sme8/mkinitrd-5.1.19.6-emc.patch
ViewVC logotype

Contents of /rpms/mkinitrd/sme8/mkinitrd-5.1.19.6-emc.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu Dec 20 18:36:32 2007 UTC (16 years, 11 months ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
No longer needed

1 --- mkinitrd-5.1.19.6/mkinitrd.emc 2007-07-12 10:06:31.000000000 -0400
2 +++ mkinitrd-5.1.19.6/mkinitrd 2007-07-12 10:06:40.000000000 -0400
3 @@ -178,14 +178,29 @@
4 return 1
5 }
6
7 +get_disk_vendor() {
8 + local vendor=$(scsi_id -g -u -s ${1#/sys} -x | grep ^ID_VENDOR= | \
9 + sed 's/^ID_VENDOR=//')
10 + [ -n "$vendor" ] || vendor=$(scsi_id -g -ppre-spc3-83 -u -s ${1#/sys} -x \
11 + | grep ^ID_VENDOR= | sed 's/^ID_VENDOR=//')
12 + [ -z "$vendor" ] && return 1
13 + echo ${vendor}
14 +}
15 +
16 # this sucks; we need a generic way to get the hardware handler
17 is_emc() {
18 - major=$(echo $1 | cut -d: -f1)
19 - minor=$(echo $1 | cut -d: -f2)
20 + local syspath=$1
21 + local devpath=$2
22 + local majmin=$(cat ${syspath}/dev)
23 + local major=$(echo $1 | cut -d: -f1)
24 + local minor=$(echo $1 | cut -d: -f2)
25 if dmsetup -C -j $major -m $minor table 2>/dev/null | \
26 grep -v "No devices found" | grep -q " emc " ; then
27 return 0
28 fi
29 + if [ "$(get_disk_vendor ${syspath})" == "DGC" ]; then
30 + return 0
31 + fi
32 return 1
33 }
34
35 @@ -194,12 +209,14 @@
36 local arg2="$2"
37 local majmin=$(cat $1/dev)
38 local ret=1
39 - if is_mpath ${majmin} ; then
40 - arg2=yes
41 - if is_emc ${majmin} ; then
42 + if [ "${arg2}" == "yes" ]; then
43 + if is_emc ${1} ${devpath} ; then
44 ret=0
45 fi
46 fi
47 + if is_mpath ${majmin} ; then
48 + arg2=yes
49 + fi
50 slaves="$1/slaves/*"
51 for slave in $slaves ; do
52 [ -e $slave ] || continue

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed