Instead of using a command to check if the user is root, use the is_root() function to perform that check in the cpuidle_03.sh script
Signed-off-by: Lisa Nguyen lisa.nguyen@linaro.org --- cpuidle/cpuidle_03.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cpuidle/cpuidle_03.sh b/cpuidle/cpuidle_03.sh index 26d3e28..d82e5e3 100755 --- a/cpuidle/cpuidle_03.sh +++ b/cpuidle/cpuidle_03.sh @@ -29,7 +29,8 @@
CPUIDLE_KILLER=./cpuidle_killer
-if [ $(id -u) -ne 0 ]; then +is_root +if [ $? -ne 0 ]; then log_skip "run as non-root" exit 0 fi