Fix: Erase all forgotten stuff from grml-config-user [Closes: issue1272]
[grml-scripts.git] / usr_sbin / grml-config
index 208beb8..d6a5e32 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: Mon Dec 05 11:12:59 CET 2005 [mika]
 ################################################################################
 
 PATH=${PATH:-'/bin/:/sbin/:/usr/bin:/usr/sbin'}
@@ -13,13 +12,13 @@ PATH=${PATH:-'/bin/:/sbin/:/usr/bin:/usr/sbin'}
 DIALOG=$(which dialog)
 PN=$(basename $0)
 
-if [ $UID != 0 ] ; then
+if [ "$(id -ru)" != "0" ] ; then
    DEFAULTITEM=user
 else
    DEFAULTITEM=root
 fi
 
-function allover() {
+allover() {
 MENU=$($DIALOG --stdout --clear --title "$PN" --default-item $DEFAULTITEM --menu \
 "Please select the scripts you would like to run.
 
@@ -28,20 +27,16 @@ http://www.grml.org/ - contact (at) grml.org
 
 " 13 65 3 \
 "root" "Admin scripts (needs root permissions)" \
-"user" "User scripts" \
 "exit" "Exit this program")
 
 retval=$?
 
 case $retval in
   0)
-        if [ $MENU == root ]; then
+        if [ "$MENU" = "root" ]; then
           exec grml-config-root
         fi
-        if [ $MENU == user ]; then
-          exec grml-config-user
-        fi
-        if [ $MENU == exit ]; then
+        if [ "$MENU" = "exit" ]; then
           exit
         fi
         ;;