Remove all bashisms; drop grml-muttng
[grml-scripts-core.git] / usr_sbin / grml-config-root
index f4d5515..1e4459a 100755 (executable)
@@ -4,7 +4,6 @@
 # Authors:       grml-team (grml.org), (c) Nico Golde <nico@grml.org>, (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mit Jul 26 19:18:09 CEST 2006 [mika]
 ################################################################################
 
 PATH=${PATH:-'/bin/:/sbin/:/usr/bin:/usr/sbin'}
@@ -13,8 +12,7 @@ PATH=${PATH:-'/bin/:/sbin/:/usr/bin:/usr/sbin'}
 DIALOG=`which dialog`
 PN=$(basename $0)
 
-if [ $UID != 0 ]
-then
+if [ "$(id -ru)" != "0" ] ; then
         $DIALOG --msgbox "Error: $0 requires root permissions. Exiting." 0 0
         exit 100
 fi
@@ -38,31 +36,31 @@ retval=$?
 
 case $retval in
   0)
-        if [ $MENU == grml-hostname ]; then
+        if [ "$MENU" = "grml-hostname" ]; then
           exec grml-hostname
         fi
-        if [ $MENU == grml-setlang ]; then
+        if [ "$MENU" = "grml-setlang" ]; then
           exec grml-setlang
         fi
-        if [ $MENU == grml-setkeyboard ]; then
+        if [ "$MENU" = "grml-setkeyboard" ]; then
           exec grml-setkeyboard
         fi
-        if [ $MENU == grml-nessus ]; then
+        if [ "$MENU" = "grml-nessus" ]; then
           exec grml-nessus
         fi
-        if [ $MENU == grml-network ]; then
+        if [ "$MENU" = "grml-network" ]; then
           exec grml-network
         fi
-        if [ $MENU == grml-postfix ]; then
+        if [ "$MENU" = "grml-postfix" ]; then
           exec grml-postfix
         fi
-        if [ $MENU == grml-terminalserver ]; then
+        if [ "$MENU" = "grml-terminalserver" ]; then
           exec grml-terminalserver
         fi
-        if [ $MENU == suspenduser ]; then
+        if [ "$MENU" = "suspenduser" ]; then
           exec suspenduser_gui.sh
         fi
-        if [ $MENU == exit ]; then
+        if [ "$MENU" = "exit" ]; then
           exit
         fi
         ;;