Merge branch 'master' into 'master'

No longer touch system directories where not needed.

See merge request risingprismtv/single-gpu-passthrough!15
This commit is contained in:
Void 2023-07-07 12:51:26 +00:00
commit d1a8e2c6a3
4 changed files with 10 additions and 10 deletions

View File

@ -7,12 +7,12 @@ if [[ $OBJECT == "win10" ]]; then
case "$OPERATION" in case "$OPERATION" in
"prepare") "prepare")
systemctl start libvirt-nosleep@"$OBJECT" 2>&1 | tee -a /var/log/libvirt/custom_hooks.log 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 /usr/local/bin/vfio-startup 2>&1 | tee -a /var/log/libvirt/custom_hooks.log
;; ;;
"release") "release")
systemctl stop libvirt-nosleep@"$OBJECT" 2>&1 | tee -a /var/log/libvirt/custom_hooks.log 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 /usr/local/bin/vfio-teardown 2>&1 | tee -a /var/log/libvirt/custom_hooks.log
;; ;;
esac esac
fi fi

View File

@ -8,13 +8,13 @@ if test -e /etc/libvirt/hooks/qemu;
then then
mv /etc/libvirt/hooks/qemu /etc/libvirt/hooks/qemu_last_backup mv /etc/libvirt/hooks/qemu /etc/libvirt/hooks/qemu_last_backup
fi fi
if test -e /bin/vfio-startup.sh; if test -e /usr/local/bin/vfio-startup;
then then
mv /bin/vfio-startup.sh /bin/vfio-startup.sh.bkp mv /usr/local/bin/vfio-startup /usr/local/bin/vfio-startup.bkp
fi fi
if test -e /bin/vfio-teardown.sh; if test -e /usr/local/bin/vfio-teardown;
then then
mv /bin/vfio-teardown.sh /bin/vfio-teardown.sh.bkp mv /usr/local/bin/vfio-teardown /usr/local/bin/vfio-teardown.bkp
fi fi
if test -e /etc/systemd/system/libvirt-nosleep@.service; if test -e /etc/systemd/system/libvirt-nosleep@.service;
then then
@ -22,10 +22,10 @@ then
fi fi
cp systemd-no-sleep/libvirt-nosleep@.service /etc/systemd/system/libvirt-nosleep@.service cp systemd-no-sleep/libvirt-nosleep@.service /etc/systemd/system/libvirt-nosleep@.service
cp hooks/vfio-startup.sh /bin/vfio-startup.sh cp hooks/vfio-startup /usr/local/bin/vfio-startup
cp hooks/vfio-teardown.sh /bin/vfio-teardown.sh cp hooks/vfio-teardown /usr/local/bin/vfio-teardown
cp hooks/qemu /etc/libvirt/hooks/qemu cp hooks/qemu /etc/libvirt/hooks/qemu
chmod +x /bin/vfio-startup.sh chmod +x /usr/local/bin/vfio-startup
chmod +x /bin/vfio-teardown.sh chmod +x /usr/local/bin/vfio-teardown
chmod +x /etc/libvirt/hooks/qemu chmod +x /etc/libvirt/hooks/qemu