diff --git a/Makefile b/Makefile index 5632f326..6c798289 100644 --- a/Makefile +++ b/Makefile @@ -57,6 +57,8 @@ ifeq ($(OS),Linux) $(MAKE) install -C linux/system-config endif python setup.py install -O1 --skip-build --root $(DESTDIR) + ln -s qvm-device $(DESTDIR)/usr/bin/qvm-pci + ln -s qvm-device $(DESTDIR)/usr/bin/qvm-usb # $(MAKE) install -C tests $(MAKE) install -C relaxng mkdir -p $(DESTDIR)/etc/qubes diff --git a/qubes/tools/qvm_device.py b/qubes/tools/qvm_device.py index 4dcf398c..df20ad94 100644 --- a/qubes/tools/qvm_device.py +++ b/qubes/tools/qvm_device.py @@ -186,7 +186,11 @@ def get_parser(device_class=None): def main(args=None): '''Main routine of :program:`qvm-block`.''' - args = get_parser().parse_args(args) + basename = os.path.basename(sys.argv[0]) + devclass = None + if basename.startswith('qvm-') and basename != 'qvm-device': + devclass = basename[4:] + args = get_parser(devclass).parse_args(args) try: args.func(args) except qubes.exc.QubesException as e: