[coreboot-gerrit] New patch to review for coreboot: board_status: Add an option to set the SSH port
Jonathan Neuschäfer (j.neuschaefer@gmx.net)
gerrit at coreboot.org
Tue Apr 26 22:20:51 CEST 2016
Jonathan Neuschäfer (j.neuschaefer at gmx.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14522
-gerrit
commit 16b01392831a02032daf05bb77ee9a99d9de60ad
Author: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
Date: Tue Apr 26 22:02:30 2016 +0200
board_status: Add an option to set the SSH port
If the option is not provided, ssh uses the default port for the host,
which may be different from 22 depending on the user's SSH configuration.
Change-Id: I303e9aeae16bd73a96c5e6d54f8e39482613db28
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer at gmx.net>
---
util/board_status/board_status.sh | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index b315be1..b0f6895 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -12,6 +12,7 @@ EXIT_FAILURE=1
# Stuff from command-line switches
COREBOOT_IMAGE="build/coreboot.rom"
REMOTE_HOST=""
+REMOTE_PORT_OPT=""
CLOBBER_OUTPUT=0
UPLOAD_RESULTS=0
SERIAL_PORT_SPEED=115200
@@ -39,7 +40,7 @@ test_cmd()
fi
if [ "$1" -eq "$REMOTE" ] && [ -n "$REMOTE_HOST" ]; then
- ssh root@${REMOTE_HOST} command -v "$2" > /dev/null
+ ssh $REMOTE_PORT_OPT root@${REMOTE_HOST} command -v "$2" > /dev/null
rc=$?
else
command -v "$2" >/dev/null
@@ -71,7 +72,7 @@ _cmd()
fi
if [ "$1" -eq "$REMOTE" ] && [ -n "$REMOTE_HOST" ]; then
- ssh "root@${REMOTE_HOST}" "$2" > "$pipe_location" 2>&1
+ ssh $REMOTE_PORT_OPT "root@${REMOTE_HOST}" "$2" > "$pipe_location" 2>&1
else
$2 > "$pipe_location" 2>&1
fi
@@ -179,6 +180,8 @@ Options
Path to coreboot image (Default is $COREBOOT_IMAGE).
-r <host>
Obtain machine information from remote host (using ssh).
+ -p <port>
+ Use a specific SSH port.
-s </dev/xxx>
Obtain boot log via serial device.
-S <speed>
@@ -188,7 +191,7 @@ Options
"
}
-while getopts "Chi:r:s:S:u" opt; do
+while getopts "Chi:r:p:s:S:u" opt; do
case "$opt" in
h)
show_help
@@ -203,6 +206,9 @@ while getopts "Chi:r:s:S:u" opt; do
r)
REMOTE_HOST="$OPTARG"
;;
+ p)
+ REMOTE_PORT_OPT="-p $OPTARG"
+ ;;
s)
SERIAL_DEVICE="$OPTARG"
;;
More information about the coreboot-gerrit
mailing list