This patch augments the get_dev_name functions for devices not properly seen by HAL.
Signed-off-by: Ricardo Marin Matinata <[email protected]> --- scripts/ovirt-config-storage | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/scripts/ovirt-config-storage b/scripts/ovirt-config-storage index eed126c..74894d1 100755 --- a/scripts/ovirt-config-storage +++ b/scripts/ovirt-config-storage @@ -140,7 +140,8 @@ check_partition_sizes() get_dev_name() { local udi_list=$(hal-find-by-capability --capability storage) - if test -z "$udi_list"; then + local byid_list=$(find /dev/disk/by-id -mindepth 1| grep -v "\-part") + if test -z "$udi_list" -a -z "$byid_list"; then warn "ERROR: no usable storage devices detected" return 1 fi @@ -164,6 +165,10 @@ get_dev_name() && devices="$block_dev" \ || devices="$devices $block_dev" done + d="" + for d in $byid_list; do + devices="$devices `readlink -f $d`"; + done # FIXME: workaround for detecting virtio block devices devices="$devices $(ls /dev/vd? 2> /dev/null | xargs)" -- 1.6.6 _______________________________________________ Ovirt-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/ovirt-devel
