Remove old vusb scripts
This is unused for a long time (since we've moved to USBIP).
This commit is contained in:
parent
32915fe126
commit
58d21f095f
1
Makefile
1
Makefile
@ -187,7 +187,6 @@ install-common:
|
||||
install -d $(DESTDIR)/etc/udev/rules.d
|
||||
install -m 0644 misc/udev-qubes-misc.rules $(DESTDIR)/etc/udev/rules.d/50-qubes-misc.rules
|
||||
install -d $(DESTDIR)$(LIBDIR)/qubes/
|
||||
install misc/vusb-ctl.py $(DESTDIR)$(LIBDIR)/qubes/
|
||||
install misc/qubes-trigger-sync-appmenus.sh $(DESTDIR)$(LIBDIR)/qubes/
|
||||
install -d -m 0750 $(DESTDIR)/etc/polkit-1/rules.d
|
||||
install -D -m 0644 misc/polkit-1-qubes-allow-all.pkla $(DESTDIR)/etc/polkit-1/localauthority/50-local.d/qubes-allow-all.pkla
|
||||
|
1
debian/qubes-core-agent.install
vendored
1
debian/qubes-core-agent.install
vendored
@ -121,7 +121,6 @@ usr/lib/qubes/update-proxy-configs
|
||||
usr/lib/qubes/upgrades-installed-check
|
||||
usr/lib/qubes/upgrades-status-notify
|
||||
usr/lib/qubes/vm-file-editor
|
||||
usr/lib/qubes/vusb-ctl.py
|
||||
usr/lib/qubes/xdg-icon
|
||||
usr/lib/systemd/user/pulseaudio.service.d/30_qubes.conf
|
||||
usr/lib/systemd/user/pulseaudio.socket.d/30_qubes.conf
|
||||
|
@ -1,24 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
##
|
||||
## Python script wrapper around xen.util.vusb_util bind_usb_device() and unbind_usb_device() methods
|
||||
## Run as root in usbvm
|
||||
##
|
||||
|
||||
from xen.util import vusb_util
|
||||
import sys
|
||||
import os
|
||||
|
||||
if len(sys.argv)!=3:
|
||||
print 'usage: vusb-ctl <bind|unbind> device'
|
||||
sys.exit(1)
|
||||
|
||||
device=sys.argv[2]
|
||||
if sys.argv[1] == 'bind':
|
||||
vusb_util.bind_usb_device(device)
|
||||
elif sys.argv[1] == 'unbind':
|
||||
vusb_util.unbind_usb_device(device)
|
||||
else:
|
||||
print "Invalid command, must be 'bind' or 'unbind'"
|
||||
sys.exit(1)
|
||||
|
@ -1,48 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
##
|
||||
## This script is for dom0
|
||||
## The syntax is modelled after "xl block-attach"
|
||||
##
|
||||
|
||||
import sys
|
||||
import os
|
||||
import xen.lowlevel.xl
|
||||
|
||||
|
||||
# parse command line
|
||||
if (len(sys.argv)<4) or (len(sys.argv)>5):
|
||||
print 'usage: xl-qvm-usb-attach.py <frontendvm-xid> <backendvm-device> <frontendvm-device> [<backendvm-xid>]'
|
||||
sys.exit(1)
|
||||
|
||||
frontendvm_xid=sys.argv[1]
|
||||
backendvm_device=sys.argv[2]
|
||||
|
||||
frontend=sys.argv[3].split('-')
|
||||
if len(frontend)!=2:
|
||||
print 'Error: frontendvm-device must be in <controller>-<port> format'
|
||||
sys.exit(1)
|
||||
(controller, port)=frontend
|
||||
|
||||
if len(sys.argv)>4:
|
||||
backendvm_xid=int(sys.argv[4])
|
||||
backendvm_name=xen.lowlevel.xl.ctx().domid_to_name(backendvm_xid)
|
||||
else:
|
||||
backendvm_xid=0
|
||||
|
||||
# FIXME: command injection
|
||||
os.system("xenstore-write /local/domain/%s/backend/vusb/%s/%s/port/%s '%s'"
|
||||
% (backendvm_xid, frontendvm_xid, controller, port, backendvm_device))
|
||||
|
||||
cmd = "/usr/lib/qubes/vusb-ctl.py bind '%s'" % backendvm_device
|
||||
if backendvm_xid == 0:
|
||||
os.system("sudo %s" % cmd)
|
||||
else:
|
||||
from qubes.qubes import QubesVmCollection
|
||||
qvm_collection = QubesVmCollection()
|
||||
qvm_collection.lock_db_for_reading()
|
||||
qvm_collection.load()
|
||||
qvm_collection.unlock_db()
|
||||
|
||||
# launch
|
||||
qvm_collection.get_vm_by_name(backendvm_name).run(cmd, user="root")
|
@ -1,49 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
##
|
||||
## This script is for dom0
|
||||
## The syntax is modelled after "xl block-attach"
|
||||
## FIXME: should be modelled after block-detach instead
|
||||
##
|
||||
|
||||
import sys
|
||||
import os
|
||||
import xen.lowlevel.xl
|
||||
|
||||
# parse command line
|
||||
if (len(sys.argv)<4) or (len(sys.argv)>5):
|
||||
print 'usage: xl-qvm-usb-detach.py <frontendvm-xid> <backendvm-device> <frontendvm-device> [<backendvm-xid>]'
|
||||
sys.exit(1)
|
||||
|
||||
frontendvm_xid=sys.argv[1]
|
||||
backendvm_device=sys.argv[2]
|
||||
|
||||
frontend=sys.argv[3].split('-')
|
||||
if len(frontend)!=2:
|
||||
print 'Error: frontendvm-device must be in <controller>-<port> format'
|
||||
sys.exit(1)
|
||||
(controller, port)=frontend
|
||||
|
||||
if len(sys.argv)>4:
|
||||
backendvm_xid=int(sys.argv[4])
|
||||
backendvm_name=xen.lowlevel.xl.ctx().domid_to_name(backendvm_xid)
|
||||
else:
|
||||
backendvm_xid=0
|
||||
|
||||
cmd = "/usr/lib/qubes/vusb-ctl.py unbind '%s'" % backendvm_device
|
||||
if backendvm_xid == 0:
|
||||
os.system("sudo %s" % cmd)
|
||||
else:
|
||||
from qubes.qubes import QubesVmCollection
|
||||
qvm_collection = QubesVmCollection()
|
||||
qvm_collection.lock_db_for_reading()
|
||||
qvm_collection.load()
|
||||
qvm_collection.unlock_db()
|
||||
|
||||
# launch
|
||||
qvm_collection.get_vm_by_name(backendvm_name).run(cmd, user="root")
|
||||
|
||||
# FIXME: command injection
|
||||
os.system("xenstore-write /local/domain/%s/backend/vusb/%s/%s/port/%s ''"
|
||||
% (backendvm_xid, frontendvm_xid, controller, port))
|
||||
|
@ -534,7 +534,6 @@ rm -f %{name}-%{version}
|
||||
/usr/bin/qrexec-client-vm
|
||||
/usr/bin/qubes-session-autostart
|
||||
%dir /usr/lib/qubes
|
||||
/usr/lib/qubes/vusb-ctl.py*
|
||||
/usr/lib/qubes/sync-ntp-clock
|
||||
/usr/lib/qubes/prepare-suspend
|
||||
/usr/lib/qubes/qrexec-agent
|
||||
|
Loading…
Reference in New Issue
Block a user