cubieboard: mkcubiecard: use the right command for checking user privilege
PATCH 1/1 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 <[email protected]>
Reviewed-by Arvid Picciani <[email protected]>
--- board/cubietech/cubieboard/mkcubiecard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
board/cubietech/cubieboard/mkcubiecard.sh +1 -1
@@ -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
Signature · 1 line
1.8.4.4
PATCH 1/1 cubieboard: mkcubiecard: use the right command for checking user privilege
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Andi" == Andi Shyti <[email protected]> writes:
On some shell environments the EUID variable, which checks the user id, is not defined. Use
id -uinstead.This patch mutes the following error:
./board/cubietech/cubieboard/mkcubiecard.sh: 31: [: -ne: unexpected operator
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard