2 # Filename: grml-autoconfig
3 # Purpose: configuration interface for grml-autoconfig
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika(at)grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 ################################################################################
9 if [ $(id -u) != 0 ] ; then
10 echo "Error: please run this script with uid 0 (root)." ; exit 1
18 AUTOCONFIG=/etc/grml/autoconfig
19 [ -r $AUTOCONFIG ] || exit 1
27 sed -i "s/$1.*/$1'yes'/" ${CONFIG_AUTOCONFIG_LOCAL}
33 sed -i "s/$1.*/$1'no'/" ${CONFIG_AUTOCONFIG_LOCAL}
38 grep -q $* $TMPFILE && return 0 || return 1
43 if ! grep -q ${1} ${CONFIG_AUTOCONFIG_LOCAL} 2>/dev/null ; then
44 grep $1 ${AUTOCONFIG} >> ${CONFIG_AUTOCONFIG_LOCAL}
50 [ $1 = 'yes' ] && return 0 || return 1
54 is_set $CONFIG_FSTAB && FSTABSTATUS=ON || FSTABSTATUS=OFF
55 is_set $CONFIG_CPU && CPUSTATUS=ON || CPUSTATUS=OFF
56 is_set $CONFIG_ACPI_APM && ACPI_APMSTATUS=ON || ACPI_APMSTATUS=OFF
57 is_set $CONFIG_SYSLOG && SYSLOGSTATUS=ON || SYSLOGSTATUS=OFF
58 is_set $CONFIG_GPM && GPMSTATUS=ON || GPMSTATUS=OFF
64 dialog --cr-wrap --clear --cancel-label "Exit" --title "$PN" --checklist "grml-autoconfig is the framework which includes hardware
65 detection, activation of system services and this is the
66 interface to activate or deactivate some features.
68 If you do not know what to do at this stage just leave it untouched,
69 the defaults represent the recommended values.
71 All the configuration happens in the file /etc/grml/autoconfig.local -
72 you can edit the file manually as well.
74 Please do not confuse these settings with plain Debian configuration.
75 For example disabling dhcp here will NOT deactivate any configured network
76 settings in /etc/network/interfaces, it just configures grml-autoconfig
77 related settings instead.
79 fstab "update /etc/fstab entries (check for devices)" $FSTABSTATUS \
80 cpufreq "activate cpu frequency scaling" $CPUSTATUS \
81 acpi_apm "load ACPI/APM modules" $ACPI_APMSTATUS \
82 syslog "start syslog-ng" $SYSLOGSTATUS \
83 gpm "start GPM (mouse on console)" $GPMSTATUS \
89 check_setting fstab && activate_value CONFIG_FSTAB= || deactivate_value CONFIG_FSTAB=
90 check_setting cpufreq && activate_value CONFIG_CPU= || deactivate_value CONFIG_CPU=
91 check_setting acpi_apm && activate_value CONFIG_ACPI_APM= || deactivate_value CONFIG_ACPI_APM=
92 check_setting syslog && activate_value CONFIG_SYSLOG= || deactivate_value CONFIG_SYSLOG=
93 check_setting gpm && activate_value CONFIG_GPM= || deactivate_value CONFIG_GPM=
102 set_values && dialog --stdout --title "${PN}" --msgbox "Adjusting values via grml-autoconfig was successful!" 5 60 || \
103 dialog --stdout --title "${PN}" --msgbox "There was an error adjusting values via grml-autoconfig. Sorry." 5 60
104 rm -f $TMPFILE &>/dev/null
115 ## END OF FILE #################################################################