mirror of
https://gitlab.com/risingprismtv/single-gpu-passthrough.git
synced 2025-01-03 11:25:22 +00:00
21 lines
580 B
Plaintext
21 lines
580 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
OBJECT="$1"
|
||
|
OPERATION="$2"
|
||
|
|
||
|
if [[ $OBJECT == "win10" ]]; then
|
||
|
case "$OPERATION" in
|
||
|
"prepare")
|
||
|
systemctl start libvirt-nosleep@"$OBJECT" 2>&1 | tee -a /var/log/libvirt/custom_hooks.log
|
||
|
/bin/vfio-startup.sh 2>&1 | tee -a /var/log/libvirt/custom_hooks.log
|
||
|
;;
|
||
|
|
||
|
"release")
|
||
|
systemctl stop libvirt-nosleep@"$OBJECT" 2>&1 | tee -a /var/log/libvirt/custom_hooks.log
|
||
|
/bin/vfio-teardown.sh 2>&1 | tee -a /var/log/libvirt/custom_hooks.log
|
||
|
;;
|
||
|
esac
|
||
|
fi
|
||
|
|
||
|
|