mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-19 12:24:32 +00:00
bf12d18457
On generic_linux devices, one might ssh as the root user, in which case there is no need to use sudo. In addition, some root filesystems may not have sudo (e.g. minimal buildroot/busybox). This patch attempts to detect the root user using 'id -u' and, if it detects the root user, avoids the use of sudo for running commands as well. Cc: Lisa Nguyen <lisa.nguyen@linaro.org> Signed-off-by: Kevin Hilman <khilman@linaro.org> (setrofim: modified to only test once)