mirror of
https://github.com/ben-grande/qusal.git
synced 2024-12-24 15:09:30 -05:00
fix: pci regain with invalid syntax
This commit is contained in:
parent
81f8c56a76
commit
ec9142bf27
@ -30,12 +30,12 @@ case "${1-}" in
|
||||
esac
|
||||
case "${2-}" in
|
||||
"") usage;;
|
||||
*) device="$2"
|
||||
*) device="${2}"
|
||||
esac
|
||||
|
||||
test "$(id -u)" = "0" || exec sudo "${0}"
|
||||
|
||||
echo "$device" | tee /sys/bus/pci/drivers/pciback/unbind
|
||||
modalias="$(cat "/sys/bus/pci/devices/$device/modalias")"
|
||||
mod="$(modprobe -R "$modalias | head -n 1)"
|
||||
echo "$device" | tee "/sys/bus/pci/drivers/$mod/bind")"
|
||||
echo "${device}" | tee /sys/bus/pci/drivers/pciback/unbind
|
||||
modalias="$(cat "/sys/bus/pci/devices/${device}/modalias")"
|
||||
module="$(modprobe -R "${modalias}" | head -n 1)"
|
||||
echo "${device}" | tee "/sys/bus/pci/drivers/${module}/bind"
|
||||
|
Loading…
Reference in New Issue
Block a user