#!/usr/bin/env bash # Runs a command in the Fennec OS QEMU VM (dev image, root/smartfox). # usage: vmssh.sh [--wait] 'command' OPTS=(-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -p 2222) if [ "$1" = "--wait" ]; then shift for _ in $(seq 1 60); do sshpass -p smartfox ssh "${OPTS[@]}" -o ConnectTimeout=3 root@localhost true 2>/dev/null && break sleep 2 done fi exec sshpass -p smartfox ssh "${OPTS[@]}" root@localhost "$@"