UDISKS instead of HAL

Posted by MeJ on Server Fault See other posts from Server Fault or by MeJ
Published on 2012-11-07T10:26:41Z Indexed on 2012/11/07 11:06 UTC
Read the original article Hit count: 234

Filed under:
|
|

Does anybody have some expirence with udisks, because HAL won't be longer supported on the most linux distribution, so I am thinking of to use udisks

    for UDI in $(hal-find-by-property --key storage.bus --string usb)
do
    HAL_TMP=`hal-get-property --udi $UDI --key storage.removable.media_available`
    if [ "$HAL_TMP" = "true" ]; then
        HAL_DEV=$(hal-get-property --udi $UDI --key block.device)
        HAL_SIZE=$(hal-get-property --udi $UDI --key storage.removable.media_size)
        HAL_TYPE=$(hal-get-property --udi $UDI --key storage.drive_type)

How do I have to adapt the above mentioned commands but use udisks instead of hal

Thanks!

© Server Fault or respective owner

Related posts about linux

Related posts about bash