Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/AnonR/anonr.TX.../lib/dracut/modules..../95fcoe
File: fcoe-edd.sh
#!/bin/sh
[0] Fix | Delete
[1] Fix | Delete
dcb="$1"
[2] Fix | Delete
[3] Fix | Delete
_modprobe_r_edd="0"
[4] Fix | Delete
[5] Fix | Delete
check_edd() {
[6] Fix | Delete
local cnt=0
[7] Fix | Delete
[8] Fix | Delete
[ -d /sys/firmware/edd ] && return 0
[9] Fix | Delete
[10] Fix | Delete
_modprobe_r_edd="1"
[11] Fix | Delete
modprobe edd || return $?
[12] Fix | Delete
[13] Fix | Delete
while [ $cnt -lt 600 ]; do
[14] Fix | Delete
[ -d /sys/firmware/edd ] && return 0
[15] Fix | Delete
cnt=$(($cnt+1))
[16] Fix | Delete
sleep 0.1
[17] Fix | Delete
done
[18] Fix | Delete
return 1
[19] Fix | Delete
}
[20] Fix | Delete
[21] Fix | Delete
check_edd || exit 1
[22] Fix | Delete
[23] Fix | Delete
for disk in /sys/firmware/edd/int13_*; do
[24] Fix | Delete
[ -d "$disk" ] || continue
[25] Fix | Delete
if [ -e "${disk}/pci_dev/driver" ]; then
[26] Fix | Delete
driver=$(readlink "${disk}/pci_dev/driver")
[27] Fix | Delete
driver=${driver##*/}
[28] Fix | Delete
fi
[29] Fix | Delete
# i40e uses dev_port 1 for a virtual fcoe function
[30] Fix | Delete
if [ "${driver}" = "i40e" ]; then
[31] Fix | Delete
dev_port=1
[32] Fix | Delete
fi
[33] Fix | Delete
for nic in "${disk}"/pci_dev/net/*; do
[34] Fix | Delete
[ -d "$nic" ] || continue
[35] Fix | Delete
if [ -n "${dev_port}" -a -e "${nic}/dev_port" ]; then
[36] Fix | Delete
if [ "$(cat ${nic}/dev_port)" -ne "${dev_port}" ]; then
[37] Fix | Delete
continue
[38] Fix | Delete
fi
[39] Fix | Delete
fi
[40] Fix | Delete
if [ -e ${nic}/address ]; then
[41] Fix | Delete
fcoe_interface=${nic##*/}
[42] Fix | Delete
if ! [ -e "/tmp/.fcoe-$fcoe_interface" ]; then
[43] Fix | Delete
/sbin/fcoe-up "$fcoe_interface" "$dcb"
[44] Fix | Delete
> "/tmp/.fcoe-$fcoe_interface"
[45] Fix | Delete
fi
[46] Fix | Delete
fi
[47] Fix | Delete
done
[48] Fix | Delete
done
[49] Fix | Delete
[50] Fix | Delete
[ "$_modprobe_r_edd" = "1" ] && modprobe -r edd
[51] Fix | Delete
[52] Fix | Delete
unset _modprobe_r_edd
[53] Fix | Delete
[54] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function