2012-10-10 21:53:20 +02:00
|
|
|
#!/bin/sh -xe
|
|
|
|
|
|
|
|
##
|
|
|
|
## Run this script in usbvm as root.
|
|
|
|
## FIXME: this has to be done after each reboot
|
|
|
|
##
|
|
|
|
|
|
|
|
# Copy files
|
2012-10-10 22:57:18 +02:00
|
|
|
cp misc/usb_add_change /usr/lib/qubes/usb_add_change
|
|
|
|
cp misc/usb_remove /usr/lib/qubes/usb_remove
|
2012-10-11 00:04:25 +02:00
|
|
|
cp misc/vusb-ctl.py /usr/lib/qubes/vusb-ctl.py
|
2012-10-10 21:53:20 +02:00
|
|
|
cp misc/qubes_usb.rules /etc/udev/rules.d/99-qubes_usb.rules
|
|
|
|
|
2012-10-12 20:36:01 +02:00
|
|
|
# FIXME: need better way to deploy libraries needed by xen.vusb_util
|
|
|
|
[ -d /usr/lib64/python2.7/site-packages ] &&
|
|
|
|
tar xzf install-pvusb-xen.tgz -C /usr/lib64/python2.7/site-packages
|
2012-10-11 21:57:12 +02:00
|
|
|
|
2012-10-11 00:06:10 +02:00
|
|
|
# Load PVUSB backend
|
2012-10-10 21:53:20 +02:00
|
|
|
modprobe xen-usbback
|
|
|
|
|
|
|
|
# Configure udevd and make it re-populate xenstore
|
|
|
|
udevadm control --reload-rules
|
|
|
|
udevadm trigger --action=change
|