mirror of
https://github.com/ben-grande/qusal.git
synced 2025-07-31 10:19:06 -04:00
feat: add interactive Qrexec shell
This commit is contained in:
parent
cc8df4151d
commit
90bc59a98f
3 changed files with 43 additions and 0 deletions
7
LICENSES/0BSD.txt
Normal file
7
LICENSES/0BSD.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
BSD Zero Clause License
|
||||
|
||||
Copyright (C) YEAR by AUTHOR EMAIL
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
27
salt/dom0/files/bin/qvm-shell
Executable file
27
salt/dom0/files/bin/qvm-shell
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
# SPDX-FileCopyrightText: 2017 - 2023 Rusty Bird <rustybird@net-c.com>
|
||||
#
|
||||
# SPDX-License-Identifier: 0BSD
|
||||
|
||||
set -eu
|
||||
|
||||
usage(){
|
||||
eof="$(stty -a | sed -n 's/.*eof = \([^;]*\);.*/\1/p')"
|
||||
printf '%s\n' "Usage: ${0##*/} [QVM-RUN_OPTIONS] <QUBE>
|
||||
Quit: ${eof}" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
case "${1-}" in
|
||||
""|-h|-?-help) usage;;
|
||||
*) ;;
|
||||
esac
|
||||
|
||||
if test -t 0; then
|
||||
stty_bak="$(stty -g)"
|
||||
trap 'stty ${stty_bak}' EXIT
|
||||
stty -echo -icanon intr ""
|
||||
fi
|
||||
|
||||
qvm-run --pass-io "${@}" -- 'LC_CTYPE=C script --quiet --return /dev/null'
|
|
@ -6,6 +6,15 @@ SPDX-License-Identifier: AGPL-3.0-or-later
|
|||
|
||||
{% if grains['nodename'] == 'dom0' -%}
|
||||
|
||||
"{{ slsdotpath }}-shell-helper":
|
||||
file.managed:
|
||||
- name: /usr/local/bin/qvm-shell
|
||||
- source: salt://{{ slsdotpath }}/files/bin/qvm-shell
|
||||
- mode: "0755"
|
||||
- user: root
|
||||
- group: root
|
||||
- makedirs: True
|
||||
|
||||
"{{ slsdotpath }}-terminal-helper":
|
||||
file.managed:
|
||||
- name: /usr/local/bin/qvm-terminal
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue