X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=usr_bin%2Fcaps-ctrl;h=8096e42b4279a502a1afa543682aa516a2676b06;hb=0833583263cbd872fd5990667f2afb2553c68d53;hp=b0d8f649778b89f1d792ba986f560e9392ce7241;hpb=9fef74081f53d30174118872324fa62d4a8145b5;p=grml-scripts.git diff --git a/usr_bin/caps-ctrl b/usr_bin/caps-ctrl index b0d8f64..8096e42 100755 --- a/usr_bin/caps-ctrl +++ b/usr_bin/caps-ctrl @@ -15,9 +15,9 @@ emulate zsh autoload -U colors ; colors if [[ -z $DISPLAY ]] ; then # test if X is not running when calling us - if [[ $UID != 0 ]] ; then # test if user root did invoke this command + if [ $(id -u) != 0 ] ; then # test if user root did invoke this command eerror "As of Linux 2.6.15 you need root permissions for changing" - eerror "the keyboard on console using loadkeys for security reasons." + eerror "the keyboard on console using loadkeys for security reasons." eerror "Run this program with root permissions. Exiting." ; eend 1 exit 1 fi