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)