Install all packages in debs directory if debs boot parameter is specified
[grml-autoconfig.git] / sbin / grml-autoconfig
index 9806ac3..0e31807 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Filename:      grml-autoconfig
 # Purpose:       configuration interface for grml-autoconfig
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika(at)grml.org>
 # Filename:      grml-autoconfig
 # Purpose:       configuration interface for grml-autoconfig
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika(at)grml.org>
@@ -6,7 +6,7 @@
 # License:       This file is licensed under the GPL v2.
 ################################################################################
 
 # License:       This file is licensed under the GPL v2.
 ################################################################################
 
-if [ "$UID" != 0 ];  then
+if [ $(id -u) != 0 ] ; then
   echo "Error: please run this script with uid 0 (root)." ; exit 1
 fi
 
   echo "Error: please run this script with uid 0 (root)." ; exit 1
 fi
 
@@ -51,10 +51,6 @@ is_set()
 }
 check_current_state()
 {
 }
 check_current_state()
 {
-  is_set $CONFIG_DHCP       && DHCPSTATUS=ON     || DHCPSTATUS=OFF
-  if [ "$(grep '^auto' /etc/network/interfaces | sed 's/ lo// ; s/auto// ; s/ //g')" != "" ] ; then
-     DHCPSTATUS=OFF
-  fi
   is_set $CONFIG_FSTAB      && FSTABSTATUS=ON    || FSTABSTATUS=OFF
   is_set $CONFIG_CPU        && CPUSTATUS=ON      || CPUSTATUS=OFF
   is_set $CONFIG_ACPI_APM   && ACPI_APMSTATUS=ON || ACPI_APMSTATUS=OFF
   is_set $CONFIG_FSTAB      && FSTABSTATUS=ON    || FSTABSTATUS=OFF
   is_set $CONFIG_CPU        && CPUSTATUS=ON      || CPUSTATUS=OFF
   is_set $CONFIG_ACPI_APM   && ACPI_APMSTATUS=ON || ACPI_APMSTATUS=OFF
@@ -70,14 +66,18 @@ detection, activation of system services and this is the
 interface to activate or deactivate some features.
 
 If you do not know what to do at this stage just leave it untouched,
 interface to activate or deactivate some features.
 
 If you do not know what to do at this stage just leave it untouched,
-the defaults are the recommended values.
+the defaults represent the recommended values.
+
+All the configuration happens in the file /etc/grml/autoconfig.local -
+you can edit the file manually as well.
 
 
-All the configuration happens in the file /etc/grml/autoconfig.local - you can
-edit it manually as well.
+Please do not confuse these settings with plain Debian configuration.
+For example disabling dhcp here will NOT deactivate any configured network
+settings in /etc/network/interfaces, it just configures grml-autoconfig
+related settings instead.
 " 0 0 0 \
 " 0 0 0 \
-dhcp "check for network devices and run pump (get ip-address via DHCP)" $DHCPSTATUS \
 fstab "update /etc/fstab entries (check for devices)" $FSTABSTATUS \
 fstab "update /etc/fstab entries (check for devices)" $FSTABSTATUS \
-cpufreq "activate cpydyn/powernowd for frequency-scalable CPUs" $CPUSTATUS \
+cpufreq "activate cpu frequency scaling" $CPUSTATUS \
 acpi_apm "load ACPI/APM modules" $ACPI_APMSTATUS \
 syslog "start syslog-ng" $SYSLOGSTATUS \
 gpm "start GPM (mouse on console)" $GPMSTATUS \
 acpi_apm "load ACPI/APM modules" $ACPI_APMSTATUS \
 syslog "start syslog-ng" $SYSLOGSTATUS \
 gpm "start GPM (mouse on console)" $GPMSTATUS \
@@ -86,7 +86,6 @@ gpm "start GPM (mouse on console)" $GPMSTATUS \
 
 set_values()
 {
 
 set_values()
 {
-  check_setting dhcp      && activate_value CONFIG_DHCP=     || deactivate_value CONFIG_DHCP=
   check_setting fstab     && activate_value CONFIG_FSTAB=    || deactivate_value CONFIG_FSTAB=
   check_setting cpufreq   && activate_value CONFIG_CPU=      || deactivate_value CONFIG_CPU=
   check_setting acpi_apm  && activate_value CONFIG_ACPI_APM= || deactivate_value CONFIG_ACPI_APM=
   check_setting fstab     && activate_value CONFIG_FSTAB=    || deactivate_value CONFIG_FSTAB=
   check_setting cpufreq   && activate_value CONFIG_CPU=      || deactivate_value CONFIG_CPU=
   check_setting acpi_apm  && activate_value CONFIG_ACPI_APM= || deactivate_value CONFIG_ACPI_APM=