From 3c1381c29b8582f17774754c49f75eef84cc9a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Pierret=20=28fepitre=29?= Date: Thu, 8 Aug 2019 15:12:26 +0200 Subject: [PATCH] Add qvm-connect-tool to ease creating ad-hoc connections --- Makefile | 1 + debian/qubes-core-agent.install | 1 + misc/qvm-connect-tcp | 39 +++++++++++++++++++++++++++++++++ rpm_spec/core-agent.spec.in | 1 + 4 files changed, 42 insertions(+) create mode 100755 misc/qvm-connect-tcp diff --git a/Makefile b/Makefile index b0e1cc9..f70df85 100644 --- a/Makefile +++ b/Makefile @@ -316,6 +316,7 @@ install-common: install-doc install -m 0755 misc/tinyproxy-wrapper $(DESTDIR)/usr/lib/qubes/tinyproxy-wrapper install -m 0755 misc/qvm-console $(DESTDIR)$(BINDIR)/qvm-console + install -m 0755 misc/qvm-connect-tcp $(DESTDIR)$(BINDIR)/qvm-connect-tcp install -d $(DESTDIR)/var/run/qubes install -d $(DESTDIR)/rw diff --git a/debian/qubes-core-agent.install b/debian/qubes-core-agent.install index e90651c..60b014e 100644 --- a/debian/qubes-core-agent.install +++ b/debian/qubes-core-agent.install @@ -102,6 +102,7 @@ usr/bin/qvm-move-to-vm usr/bin/qvm-open-in-dvm usr/bin/qvm-open-in-vm usr/bin/qvm-run-vm +usr/bin/qvm-connect-tcp usr/bin/qvm-console usr/bin/qvm-sync-clock usr/bin/xenstore-watch-qubes diff --git a/misc/qvm-connect-tcp b/misc/qvm-connect-tcp new file mode 100755 index 0000000..24af52f --- /dev/null +++ b/misc/qvm-connect-tcp @@ -0,0 +1,39 @@ +#!/bin/bash -- +set -e +[[ "$DEBUG" == "1" ]] && set -x + +LOCALPORT="$(echo "$1" | cut -d ':' -f1)" +DOMAIN="$(echo "$1" | cut -d ':' -f2)" +PORT="$(echo "$1" | cut -d ':' -f3)" + +print_usage() { +cat >&2 <