[Ovirt-devel] [PATCH node] Small patch to find disks if hal doesn't return one.

Darryl L. Pierce dpierce at redhat.com
Tue Jan 6 20:32:29 UTC 2009


If hal does not return any devices with the storage capability, and
that's of type disk and block, then the script will grab all devices
that meets the pattern /dev/[shv]d? and show them.

Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
---
 scripts/ovirt-config-storage |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage
index 1c31a58..78e56dc 100755
--- a/scripts/ovirt-config-storage
+++ b/scripts/ovirt-config-storage
@@ -75,6 +75,9 @@ get_dev_name()
             || devices="$devices $block_dev"
     done
 
+    # if we didn't find any devices using HAL, so check for virtual devices
+    if [ -z $devices ]; then devices=$(ls -l /dev/[shv]d?);  fi
+
     # If there's only one device, use it.
     case $devices in
         '') warn "ERROR: found no usable block device"; return 1;;
-- 
1.6.0.6




More information about the ovirt-devel mailing list