- Timestamp:
- Dec 18, 2011, 2:52:51 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mindi/mindi
r2916 r2917 785 785 # $1: disk device (i.e. /dev/hda1) 786 786 GetParentRaidDev() { 787 if [ ! -f /etc/raidtab ]; then 788 return 789 fi 787 790 $AWK "/^[[:space:]]*#/ {next} /^[[:space:]]*raiddev/ {dev=\$2} /^[[:space:]]*device/ {if(\$2==\"$1\") {print dev; exit}}" < /etc/raidtab 788 791 } … … 792 795 # $1: raid device (/dev/md...) 793 796 GetRaidDevMembers() { 797 if [ ! -f /etc/raidtab ]; then 798 return 799 fi 794 800 $AWK "/^[[:space:]]*#/ {next} /^[[:space:]]*raiddev/ {if(dev) exit; if(\$2 == \"$1\") dev=\$2} /^[[:space:]]*device/ {if(dev) {print \$2}}" < /etc/raidtab 795 801 } … … 1066 1072 useless_dev="/dev/floppy /dev/fd0h1440 /dev/fd0H1440 /dev/cdrom /dev/cdrom/cdrom /dev/cdrom/cdrom1 /dev/cdrom/cdrom2 /dev/cdrom0 /dev/cdrom1 /dev/cdrom2 /dev/cdrom3 /dev/cdrw /dev/scd /dev/ram :/ /dev/sr0 /dev/sr1 /dev/cdrom1" 1067 1073 for c_p in $all_partitions ; do 1068 # Skip evices, network FS, cisf1074 # Skip fd/cd devices, network FS, cifs 1069 1075 [ "`echo "$useless_dev" | grep -F "$c_p"`" != "" ] || [ "`echo "$c_p" | grep ":"`" != "" ] || [ "`echo "$c_p" | grep -E "^//"`" != "" ]&& continue 1070 1076 [ "`echo "$c_p" | grep -x "/dev/cdroms.*"`" ] && continue … … 2206 2212 local devpath drive res stub 2207 2213 device=$1 2214 if [ "`echo "$device" | grep -E "^/dev/"`" = "" ] ; then 2215 Die "Cannot find $device's size - is your /etc/fstab sane?" 2216 fi 2208 2217 if [ "`echo "$device" | grep -F "/dev/md"`" != "" ] ; then 2209 2218 res=`SizeOfRaidPartition $device`
Note:
See TracChangeset
for help on using the changeset viewer.