diff --git a/hooks/qemu b/hooks/qemu index c68007c..64d3b9d 100755 --- a/hooks/qemu +++ b/hooks/qemu @@ -7,12 +7,12 @@ 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 + /usr/local/bin/vfio-startup 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 + /usr/local/bin/vfio-teardown 2>&1 | tee -a /var/log/libvirt/custom_hooks.log ;; esac fi diff --git a/hooks/vfio-startup.sh b/hooks/vfio-startup similarity index 100% rename from hooks/vfio-startup.sh rename to hooks/vfio-startup diff --git a/hooks/vfio-teardown.sh b/hooks/vfio-teardown similarity index 100% rename from hooks/vfio-teardown.sh rename to hooks/vfio-teardown diff --git a/install_hooks.sh b/install_hooks.sh index 793a839..8a084c6 100755 --- a/install_hooks.sh +++ b/install_hooks.sh @@ -8,13 +8,13 @@ if test -e /etc/libvirt/hooks/qemu; then mv /etc/libvirt/hooks/qemu /etc/libvirt/hooks/qemu_last_backup fi -if test -e /bin/vfio-startup.sh; +if test -e /usr/local/bin/vfio-startup; then - mv /bin/vfio-startup.sh /bin/vfio-startup.sh.bkp + mv /usr/local/bin/vfio-startup /usr/local/bin/vfio-startup.bkp fi -if test -e /bin/vfio-teardown.sh; +if test -e /usr/local/bin/vfio-teardown; then - mv /bin/vfio-teardown.sh /bin/vfio-teardown.sh.bkp + mv /usr/local/bin/vfio-teardown /usr/local/bin/vfio-teardown.bkp fi if test -e /etc/systemd/system/libvirt-nosleep@.service; then @@ -22,10 +22,10 @@ then fi 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-teardown.sh /bin/vfio-teardown.sh +cp hooks/vfio-startup /usr/local/bin/vfio-startup +cp hooks/vfio-teardown /usr/local/bin/vfio-teardown cp hooks/qemu /etc/libvirt/hooks/qemu -chmod +x /bin/vfio-startup.sh -chmod +x /bin/vfio-teardown.sh +chmod +x /usr/local/bin/vfio-startup +chmod +x /usr/local/bin/vfio-teardown chmod +x /etc/libvirt/hooks/qemu