bootdisk/trunk/batch-installer/ui/ui-wizard

hawk cvs at pld-linux.org
Thu Nov 24 22:47:04 CET 2005


Author: hawk
Date: Thu Nov 24 22:46:55 2005
New Revision: 6564

Modified:
   bootdisk/trunk/batch-installer/ui/ui-wizard
Log:
- hopefully fixed disk detection via /proc/partitions


Modified: bootdisk/trunk/batch-installer/ui/ui-wizard
==============================================================================
--- bootdisk/trunk/batch-installer/ui/ui-wizard	(original)
+++ bootdisk/trunk/batch-installer/ui/ui-wizard	Thu Nov 24 22:46:55 2005
@@ -702,10 +702,22 @@
 select_dest_devices () {
   local avail_dest_devices tmp_devices
 
-  # get available destination devices from /proc/partitions
-  avail_dest_devices=`awk '{print $4" "$5}' /proc/partitions | \
-                      grep -v ' 0$' | awk '/[1-9]/ {print "/dev/"$1}' |
-                      grep -v $source_device | sort`
+  # get available destination devices from /proc/partitions,
+  # we are looking only for IDE, SCSI/SATA, DAC960, Compaq IDA,
+  # Compaq NGDA, IDE raid and I2O disks.
+  avail_dest_devices=`awk '
+    {
+    if (
+        match($4, /hd[a-h]$/) ||
+        match($4, /sd[a-h]$/) ||
+        match($4, /rd\/c[0-9]d[0-9]*$/) ||
+        match($4, /ida\/c[0-9]d[0-9]*$/) ||
+        match($4, /cciss\/c[0-9]d[0-9]*$/) ||
+        match($4, /ataraid\/d[0-9]*$/) ||
+        match($4, /i2o\/hd[a-h]*$/))
+        print "/dev/" $4
+    }
+    ' /proc/partitions`
 
   if test -z "$avail_dest_devices"; then
     info $(nls "No available destination devices found.")



More information about the pld-cvs-commit mailing list