dvp/qvm-usb: reworked installation scripts for usbvm and added one for appvms

This commit is contained in:
Alexandre Bezroutchko 2012-10-10 21:53:20 +02:00
parent 17263c96b8
commit 6600825cb4
3 changed files with 33 additions and 22 deletions

25
install-pvusb-backend.sh Executable file
View File

@ -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

8
install-pvusb-frontend.sh Executable file
View File

@ -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

View File

@ -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