Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../lib/dracut/modules..../95virtfs
File: module-setup.sh
#!/bin/bash
[0] Fix | Delete
[1] Fix | Delete
# called by dracut
[2] Fix | Delete
check() {
[3] Fix | Delete
[[ $hostonly ]] || [[ $mount_needs ]] && {
[4] Fix | Delete
for fs in "${host_fs_types[@]}"; do
[5] Fix | Delete
[[ "$fs" == "9p" ]] && return 0
[6] Fix | Delete
done
[7] Fix | Delete
return 255
[8] Fix | Delete
}
[9] Fix | Delete
[10] Fix | Delete
if type -P systemd-detect-virt >/dev/null 2>&1; then
[11] Fix | Delete
vm=$(systemd-detect-virt --vm >/dev/null 2>&1)
[12] Fix | Delete
(($? != 0)) && return 255
[13] Fix | Delete
[[ $vm = "qemu" ]] && return 0
[14] Fix | Delete
[[ $vm = "kvm" ]] && return 0
[15] Fix | Delete
[[ $vm = "bochs" ]] && return 0
[16] Fix | Delete
fi
[17] Fix | Delete
[18] Fix | Delete
for i in /sys/class/dmi/id/*_vendor; do
[19] Fix | Delete
[[ -f $i ]] || continue
[20] Fix | Delete
read vendor < $i
[21] Fix | Delete
[[ "$vendor" == "QEMU" ]] && return 0
[22] Fix | Delete
[[ "$vendor" == "Bochs" ]] && return 0
[23] Fix | Delete
done
[24] Fix | Delete
return 255
[25] Fix | Delete
}
[26] Fix | Delete
[27] Fix | Delete
# called by dracut
[28] Fix | Delete
depends() {
[29] Fix | Delete
return 0
[30] Fix | Delete
}
[31] Fix | Delete
[32] Fix | Delete
# called by dracut
[33] Fix | Delete
installkernel() {
[34] Fix | Delete
instmods 9p 9pnet_virtio virtio_pci
[35] Fix | Delete
}
[36] Fix | Delete
[37] Fix | Delete
# called by dracut
[38] Fix | Delete
install() {
[39] Fix | Delete
inst_hook cmdline 95 "$moddir/parse-virtfs.sh"
[40] Fix | Delete
inst_hook mount 99 "$moddir/mount-virtfs.sh"
[41] Fix | Delete
}
[42] Fix | Delete
[43] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function