소스 검색

cubieboard: mkcubiecard: use the right command for checking user privilege

On some shell environments the EUID variable, which checks the
user id, is not defined. Use `id -u` instead.

This patch mutes the following error:

./board/cubietech/cubieboard/mkcubiecard.sh: 31: [: -ne: unexpected operator

Signed-off-by: Andi Shyti <andi@etezian.org>
Reviewed-by: Arvid Picciani <aep@exys.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Andi Shyti 11 년 전
부모
커밋
2257e36a57
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      board/cubietech/cubieboard/mkcubiecard.sh

+ 1 - 1
board/cubietech/cubieboard/mkcubiecard.sh

@@ -28,7 +28,7 @@ if [ $# -ne 2 ]; then
 	exit 1;
 fi
 
-if [ $EUID -ne 0 ]; then
+if [ `id -u` -ne 0 ]; then
 	echo "This script must be run as root" 1>&2
 	exit 1
 fi