board_status: Remove sudo when checking for cbmem with command

I get the error below when using the following command in combination
with sudo:

sudo command -v $SOME_COMMAND
sudo: command: command not found

Detection of the cbmem path is working fine without sudo.

Change-Id: I8788c190ffebde117e2abd3df924c48d8f6fd05d
Signed-off-by: Matthias Gazzari <mail@qtux.eu>
Reviewed-on: https://review.coreboot.org/25989
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
This commit is contained in:
Matthias Gazzari 2018-05-02 15:43:27 +02:00 committed by Martin Roth
parent 838f296d05
commit 25c7e322e8
1 changed files with 3 additions and 3 deletions

View File

@ -378,10 +378,10 @@ elif [ -n "$REMOTE_HOST" ]; then
else
echo "Verifying that CBMEM is available"
if [ $(id -u) -ne 0 ]; then
sudo command -v "$cbmem_cmd" >/dev/null
command -v "$cbmem_cmd" >/dev/null
if [ $? -ne 0 ]; then
echo "Failed to run $cbmem_cmd using sudo. Check \$PATH or use -c" \
"to specify path to cbmem binary."
echo "Failed to run $cbmem_cmd. Check \$PATH or" \
"use -c to specify path to cbmem binary."
exit $EXIT_FAILURE
else
cbmem_cmd="sudo $cbmem_cmd"