diff options
author | Andi Shyti <andi@etezian.org> | 2013-12-02 14:46:07 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2013-12-03 12:17:20 +0100 |
commit | 2257e36a57c15ef31a013dac56ff7c551fec70c5 (patch) | |
tree | 6ada4f26ea1fab7655887145087d40607cee6288 | |
parent | a34cad761baa82e50c855fe96de68de816399204 (diff) | |
download | buildroot-2257e36a57c15ef31a013dac56ff7c551fec70c5.tar.gz buildroot-2257e36a57c15ef31a013dac56ff7c551fec70c5.zip |
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>
-rwxr-xr-x | board/cubietech/cubieboard/mkcubiecard.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/board/cubietech/cubieboard/mkcubiecard.sh b/board/cubietech/cubieboard/mkcubiecard.sh index 34afc87088..f1d5a9fb45 100755 --- a/board/cubietech/cubieboard/mkcubiecard.sh +++ b/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 |