X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=sbin%2Fmodemlink;h=fa9c3b1fcba404e00dbf1b5f60b09eaab78de7fd;hb=6491538dd1b832fcae56d058b2a0685f2e643460;hp=9b4fc350f162c06757c9f9de94008ccc602d89f7;hpb=66fc88b890e452d7bf6ebde5a3404fc75d8dfa66;p=grml-network.git diff --git a/sbin/modemlink b/sbin/modemlink index 9b4fc35..fa9c3b1 100755 --- a/sbin/modemlink +++ b/sbin/modemlink @@ -4,7 +4,6 @@ # Authors: (c) Klaus Knopper Mar 2004, (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mit Okt 04 11:51:09 CEST 2006 [mika] ################################################################################ PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin" @@ -13,9 +12,8 @@ export PATH # 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)