From 9fdb9ef93f588cc9072aeffa8753d8db55f2c39d Mon Sep 17 00:00:00 2001 From: Ali Mirjamali Date: Fri, 5 Jul 2024 01:08:51 +0330 Subject: [PATCH] Implementing -h & --help for qvm-console-dispvm fixes: https://github.com/QubesOS/qubes-issues/issues/8019 --- qvm-tools/qvm-console-dispvm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/qvm-tools/qvm-console-dispvm b/qvm-tools/qvm-console-dispvm index 21b1bce9b..73a0f79da 100755 --- a/qvm-tools/qvm-console-dispvm +++ b/qvm-tools/qvm-console-dispvm @@ -2,12 +2,20 @@ set -eu print_usage() { cat >&2 << USAGE -Usage: $0 [--autostart] [--] vmname +Usage: $0 [--help] [--autostart] [--] vmname + Connects to VM console throught DispVM using the qubes.ShowInTerminal RPC service. -With --autostart, start the VM first. + + --help, -h show this help message and exit + --autostart start the VM first. USAGE } +if [ "$1" == "--help" ] || [ "$1" == "-h" ]; then + print_usage + exit 0 +fi + do_start=false if [[ $# -ge 2 ]] && [[ "$1" = '--autostart' ]]; then do_start=: