[coreboot-gerrit] New patch to review for coreboot: 48f9302 board_status.sh allow cmd() to not save output

Martin Roth (gaumless@gmail.com) gerrit at coreboot.org
Thu Jul 10 23:02:39 CEST 2014


Martin Roth (gaumless at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6258

-gerrit

commit 48f9302ec5bab7afdaf77134ef87a582e236d13f
Author: Martin Roth <martin.roth at se-eng.com>
Date:   Thu Jul 10 14:57:34 2014 -0600

    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 at se-eng.com>
---
 util/board_status/board_status.sh | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh
index 7c321b3..20ba48f 100755
--- a/util/board_status/board_status.sh
+++ b/util/board_status/board_status.sh
@@ -60,10 +60,16 @@ _cmd()
 		return $EXIT_FAILURE
 	fi
 
+	if [ -n "$3" ]; then
+		pipe_location="${3}"
+	else
+		pipe_location="/dev/null"
+	fi
+
 	if [ "$1" -eq "$REMOTE" ] && [ -n "$REMOTE_HOST" ]; then
-		ssh root@${REMOTE_HOST} "$2" > "${3}" 2>&1
+		ssh root@${REMOTE_HOST} "$2" > "$pipe_location" 2>&1
 	else
-		$2 > "${3}" 2>&1
+		$2 > "$pipe_location" 2>&1
 	fi
 
 	return $?



More information about the coreboot-gerrit mailing list