zsh-login: do not disable grml-quickconfig for serial console
[grml-scripts.git] / usr_bin / caps-ctrl
index e597c90..8096e42 100755 (executable)
@@ -4,7 +4,6 @@
 # Authors:       grml-team (grml.org),  (c) Matthias Kopfermann <maddi@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Don Nov 23 22:32:29 CET 2006 [mika]
 ################################################################################
 
 if . /etc/grml/script-functions ; then
@@ -16,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