mirror of
https://gitlab.com/risingprismtv/single-gpu-passthrough.git
synced 2024-12-22 05:35:21 +00:00
No longer touch system directories where not needed.
This commit is contained in:
parent
e94c32df36
commit
e70f12845e
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user