fix check on virtio media

This commit is contained in:
Tobias Powalowski 2012-08-30 17:37:41 +02:00
parent 6cead64e33
commit 665127c5c8

View file

@ -362,12 +362,13 @@ get_media() {
if [[ "${SET_MEDIA}" == "0" ]]; then
# scsi/sata and other devices
for dev in $(ls ${block} | egrep '^[sv]d|^sr|^scd|^sg'); do
if [[ "$(cat ${block}/${dev}/device/type)" = "5" ]]; then
check_media
fi
#check virtio devices
if ! [[ -e "${block}/${dev}/device/type" ]]; then
#check virtio devices
check_media
else
if [[ "$(cat ${block}/${dev}/device/type)" = "5" ]]; then
check_media
fi
fi
done
fi