board_status.sh allow cmd() to not save output
- allow for cmd() to be run, but not pipe to a file. Change-Id: I3e1650e421a49a06218e082ceb5a60b7b4808ce8 Signed-off-by: Martin Roth <martin.roth@se-eng.com> Reviewed-on: http://review.coreboot.org/6258 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks <dhendrix@chromium.org>
This commit is contained in:
@@ -60,10 +60,16 @@ _cmd()
|
|||||||
return $EXIT_FAILURE
|
return $EXIT_FAILURE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" -eq "$REMOTE" ] && [ -n "$REMOTE_HOST" ]; then
|
if [ -n "$3" ]; then
|
||||||
ssh root@${REMOTE_HOST} "$2" > "${3}" 2>&1
|
pipe_location="${3}"
|
||||||
else
|
else
|
||||||
$2 > "${3}" 2>&1
|
pipe_location="/dev/null"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$1" -eq "$REMOTE" ] && [ -n "$REMOTE_HOST" ]; then
|
||||||
|
ssh root@${REMOTE_HOST} "$2" > "$pipe_location" 2>&1
|
||||||
|
else
|
||||||
|
$2 > "$pipe_location" 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
return $?
|
return $?
|
||||||
|
Reference in New Issue
Block a user