mirror of
https://github.com/ben-grande/qusal.git
synced 2024-12-25 15:39:38 -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
|
esac
|
||||||
case "${2-}" in
|
case "${2-}" in
|
||||||
"") usage;;
|
"") usage;;
|
||||||
*) device="$2"
|
*) device="${2}"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
test "$(id -u)" = "0" || exec sudo "${0}"
|
test "$(id -u)" = "0" || exec sudo "${0}"
|
||||||
|
|
||||||
echo "$device" | tee /sys/bus/pci/drivers/pciback/unbind
|
echo "${device}" | tee /sys/bus/pci/drivers/pciback/unbind
|
||||||
modalias="$(cat "/sys/bus/pci/devices/$device/modalias")"
|
modalias="$(cat "/sys/bus/pci/devices/${device}/modalias")"
|
||||||
mod="$(modprobe -R "$modalias | head -n 1)"
|
module="$(modprobe -R "${modalias}" | head -n 1)"
|
||||||
echo "$device" | tee "/sys/bus/pci/drivers/$mod/bind")"
|
echo "${device}" | tee "/sys/bus/pci/drivers/${module}/bind"
|
||||||
|
Loading…
Reference in New Issue
Block a user