diff --git a/install-pvusb-backend.sh b/install-pvusb-backend.sh new file mode 100755 index 00000000..9ce29c56 --- /dev/null +++ b/install-pvusb-backend.sh @@ -0,0 +1,25 @@ +#!/bin/sh -xe + +## +## Run this script in usbvm as root. +## FIXME: this has to be done after each reboot +## + +# Copy files +for f in usb_add_change usb_remove xl-qvm-usb-attach.py ; do + cp misc/$f /usr/lib/qubes/$f +done + +cp dom0/qvm-core/qubesutils.py /usr/lib64/python2.6/site-packages/qubes/qubesutils.py +cp dom0/qvm-tools/qvm-usb /usr/bin/qvm-usb + +cp misc/qubes_usb.rules /etc/udev/rules.d/99-qubes_usb.rules + +# Reload PVUSB backend and cleanup xenstore +rmmod xen-usbback || true +modprobe xen-usbback +xenstore-rm qubes-usb-devices + +# Configure udevd and make it re-populate xenstore +udevadm control --reload-rules +udevadm trigger --action=change diff --git a/install-pvusb-frontend.sh b/install-pvusb-frontend.sh new file mode 100755 index 00000000..14e65866 --- /dev/null +++ b/install-pvusb-frontend.sh @@ -0,0 +1,8 @@ +#!/bin/sh -xe + +## +## Run this script in appvm as root +## FIXME: now this has to be done after each reboot +## + +modprobe xen-usbfront diff --git a/install_pvusb_hacks.sh b/install_pvusb_hacks.sh deleted file mode 100755 index 4fd853c0..00000000 --- a/install_pvusb_hacks.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -x - -d=/home/abb/qubes-core - -# Install -cp $d/misc/qubes_usb.rules /etc/udev/rules.d/99-qubes_usb.rules - -for f in usb_add_change usb_remove xl-qvm-usb-attach.py ; do - cp $d/misc/$f /usr/lib/qubes/$f -done - -cp $d/dom0/qvm-core/qubesutils.py /usr/lib64/python2.6/site-packages/qubes/qubesutils.py -cp $d/dom0/qvm-tools/qvm-usb /usr/bin/qvm-usb - -udevadm control --reload-rules - -# Rerun -xenstore-rm qubes-usb-devices -udevadm trigger --action=change -#sleep 1 -#xenstore-ls -f qubes-usb-devices -