Drop grml-nessus
[grml-scripts.git] / usr_sbin / grml-config-root
1 #!/bin/sh
2 # Filename:      grml-config-root
3 # Purpose:       interface for configuring your grml system
4 # Authors:       grml-team (grml.org), (c) Nico Golde <nico@grml.org>, (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2.
7 ################################################################################
8
9 PATH=${PATH:-'/bin/:/sbin/:/usr/bin:/usr/sbin'}
10
11 # set up some variables
12 DIALOG=`which dialog`
13 PN=$(basename $0)
14
15 if [ "$(id -ru)" != "0" ] ; then
16         $DIALOG --msgbox "Error: $0 requires root permissions. Exiting." 0 0
17         exit 100
18 fi
19
20 allover() {
21 MENU=$($DIALOG --stdout --clear --title "$PN" --menu \
22 "Configure your grml system.
23
24 " 0 0 0 \
25 "grml-hostname" "Set hostname" \
26 "grml-setlang" "Configure system wide language settings" \
27 "grml-setkeyboard" "Configure system wide keyboard settings" \
28 "grml-network" "Configure network settings/setup" \
29 "grml-postfix" "Configure some basic settings of the postfix MTA" \
30 "grml-terminalserver" "Configure and start terminalserver for booting via network" \
31 "suspenduser" "Suspend a user account for indefinite time" \
32 "exit" "Exit this program")
33
34 retval=$?
35
36 case $retval in
37   0)
38         if [ "$MENU" = "grml-hostname" ]; then
39           exec grml-hostname
40         fi
41         if [ "$MENU" = "grml-setlang" ]; then
42           exec grml-setlang
43         fi
44         if [ "$MENU" = "grml-setkeyboard" ]; then
45           exec grml-setkeyboard
46         fi
47         if [ "$MENU" = "grml-network" ]; then
48           exec grml-network
49         fi
50         if [ "$MENU" = "grml-postfix" ]; then
51           exec grml-postfix
52         fi
53         if [ "$MENU" = "grml-terminalserver" ]; then
54           exec grml-terminalserver
55         fi
56         if [ "$MENU" = "suspenduser" ]; then
57           exec suspenduser_gui.sh
58         fi
59         if [ "$MENU" = "exit" ]; then
60           exit
61         fi
62         ;;
63   1)
64         echo "Cancel pressed.";;
65   255)
66         echo "ESC pressed.";;
67 esac
68 }
69
70 allover
71
72 ## END OF FILE #################################################################