From 1874dca708f3a64c8feda9ebe5447bb4db305cef Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Sat, 31 Aug 2024 23:36:52 -0400 Subject: [PATCH] enable executing commands directly on the SUV --- mocha-suv/common/libexec/mocha-suv | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/mocha-suv/common/libexec/mocha-suv b/mocha-suv/common/libexec/mocha-suv index 69886a1..4960308 100755 --- a/mocha-suv/common/libexec/mocha-suv +++ b/mocha-suv/common/libexec/mocha-suv @@ -75,11 +75,18 @@ elif [ "$1" == "shell" ]; then else - echo "If you are migranting from Vagrant, the password is 'vagrant'" - echo "Use 'ssh-copy-id vagrant@$2.privatesuv.com' to set up asymmetric key login" - echo "" + if [ "$#" == "2" ]; then + # only display the banner if we aren't executing a command + echo "If you are migranting from Vagrant, the password is 'vagrant'" + echo "Use 'ssh-copy-id vagrant@$2.privatesuv.com' to set up asymmetric key login" + echo "" + fi - ssh vagrant@$2.privatesuv.com + MACHINENAME=$2 + shift + shift + + ssh vagrant@$MACHINENAME.privatesuv.com ${1+"$@"} fi