Fix detect usb devices.

lvmraid
Mike Hiretsky 13 years ago
parent dffd6ad001
commit 43a7c12d8a

@ -254,8 +254,9 @@ class fillVars(object, glob_attr):
device_hash[device] = {}
device_hash[device]['table'] = props.get('ID_PART_TABLE_TYPE','')
device_hash[device]['map'] = mapnum
if device in usbdevices:
removablePath = '/sys/block/%s/removable'%device
if path.basename(device) in usbdevices:
removablePath = '/sys/block/%s/removable'%path.basename(device)
if os.access(removablePath,R_OK) and \
open(removablePath,'r').read().strip() == "1":
devtype = "flash"

Loading…
Cancel
Save