usbinstall: properly detect usb drive instead of partition; check for mbr table to avoid detecting optical devices

This commit is contained in:
Silvan Calarco 2011-10-05 21:20:48 +02:00
parent 63b2a4c93f
commit e666f44f7e

View File

@ -109,9 +109,10 @@ for dev in $devices; do
native_path=`get_udisks_key $dev native-path`
vend=`get_udisks_key $dev vendor`
prod=`get_udisks_key $dev model`
[ -e $native_path/partition ] || continue
[ -e $native_path/partition ] && continue
is_system_internal=`get_udisks_key $dev "system internal"`
if [ "$is_system_internal" != "1" ]; then
partition_scheme=`get_udisks_key $dev "scheme"`
if [ "$is_system_internal" != "1" -a "$partition_scheme" = "mbr" ]; then
c=$((c+1))
device[$c]=$dev
vendor[$c]=$vend