Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../lib/dracut/modules..../90qemu
File: module-setup.sh
#!/bin/bash
[0] Fix | Delete
[1] Fix | Delete
# called by dracut
[2] Fix | Delete
check() {
[3] Fix | Delete
if [[ $hostonly ]] || [[ $mount_needs ]]; then
[4] Fix | Delete
if type -P systemd-detect-virt >/dev/null 2>&1; then
[5] Fix | Delete
vm=$(systemd-detect-virt --vm 2>/dev/null)
[6] Fix | Delete
(($? != 0)) && return 255
[7] Fix | Delete
[[ $vm = "qemu" ]] && return 0
[8] Fix | Delete
[[ $vm = "kvm" ]] && return 0
[9] Fix | Delete
[[ $vm = "bochs" ]] && return 0
[10] Fix | Delete
fi
[11] Fix | Delete
[12] Fix | Delete
for i in /sys/class/dmi/id/*_vendor; do
[13] Fix | Delete
[[ -f $i ]] || continue
[14] Fix | Delete
read vendor < $i
[15] Fix | Delete
[[ "$vendor" == "QEMU" ]] && return 0
[16] Fix | Delete
[[ "$vendor" == "Red Hat" ]] && return 0
[17] Fix | Delete
[[ "$vendor" == "Bochs" ]] && return 0
[18] Fix | Delete
done
[19] Fix | Delete
[20] Fix | Delete
return 255
[21] Fix | Delete
fi
[22] Fix | Delete
[23] Fix | Delete
return 0
[24] Fix | Delete
}
[25] Fix | Delete
[26] Fix | Delete
# called by dracut
[27] Fix | Delete
installkernel() {
[28] Fix | Delete
# qemu specific modules
[29] Fix | Delete
hostonly='' instmods \
[30] Fix | Delete
ata_piix ata_generic pata_acpi cdrom sr_mod ahci \
[31] Fix | Delete
virtio_blk virtio virtio_ring virtio_pci \
[32] Fix | Delete
virtio_scsi virtio_console virtio_rng virtio_mem \
[33] Fix | Delete
spapr-vscsi \
[34] Fix | Delete
qemu_fw_cfg
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function