mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 12:00:37 +02:00
fix check on virtio media
This commit is contained in:
parent
6cead64e33
commit
665127c5c8
1 changed files with 5 additions and 4 deletions
|
@ -362,12 +362,13 @@ get_media() {
|
||||||
if [[ "${SET_MEDIA}" == "0" ]]; then
|
if [[ "${SET_MEDIA}" == "0" ]]; then
|
||||||
# scsi/sata and other devices
|
# scsi/sata and other devices
|
||||||
for dev in $(ls ${block} | egrep '^[sv]d|^sr|^scd|^sg'); do
|
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
|
if ! [[ -e "${block}/${dev}/device/type" ]]; then
|
||||||
|
#check virtio devices
|
||||||
check_media
|
check_media
|
||||||
|
else
|
||||||
|
if [[ "$(cat ${block}/${dev}/device/type)" = "5" ]]; then
|
||||||
|
check_media
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue