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

Darryl L. Pierce dpierce at redhat.com
Wed Jan 7 13:01:42 UTC 2009


On Tue, Jan 06, 2009 at 03:32:29PM -0500, Darryl L. Pierce wrote:
> 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

We discussed this in IRC and I think the consensus was that it's fine.
Can someone give me an ACK?

-- 
Darryl L. Pierce, Sr. Software Engineer @ Red Hat, Inc.
Virtual Machine Management - http://www.ovirt.org/
"What do you care what other people think, Mr. Feynman?"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090107/1630ba6c/attachment.sig>


More information about the ovirt-devel mailing list