projects
/
grml-network.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix bashism/non-POSIX usage of $UID.
[grml-network.git]
/
sbin
/
modemlink
diff --git
a/sbin/modemlink
b/sbin/modemlink
index
6e4599c
..
fa9c3b1
100755
(executable)
--- a/
sbin/modemlink
+++ b/
sbin/modemlink
@@
-12,9
+12,8
@@
export PATH
# XDIALOG_HIGH_DIALOG_COMPAT=1
# export XDIALOG_HIGH_DIALOG_COMPAT
# XDIALOG_HIGH_DIALOG_COMPAT=1
# export XDIALOG_HIGH_DIALOG_COMPAT
-if [ $UID != 0 ] ; then
- echo Error: become root before starting $0 >& 2
- exit 100
+if [ "$(id -u 2>/dev/null)" != 0 ] ; then
+ echo 1>&2 "Error: please run this script with uid 0 (root)." ; exit 1
fi
TMP=$(mktemp)
fi
TMP=$(mktemp)