admin.vm.Terminal 337 B

1234567
  1. #!/bin/bash
  2. lock="/var/run/qubes/$QREXEC_REQUESTED_TARGET.terminal.lock"
  3. # Create an exclusive lock to ensure that multiple qubes cannot access to the same socket
  4. # In the case of multiple qrexec calls it returns a specific exit code
  5. sudo flock -n -E 200 -x "$lock" socat - OPEN:"$(virsh -c xen ttyconsole "$QREXEC_REQUESTED_TARGET")"