From: Michael Prokop Date: Thu, 16 Nov 2006 19:29:31 +0000 (+0100) Subject: * grml-autoconfig script: deprecate CONFIG_KERNEL, CONFIG_LANGUAGE, X-Git-Tag: 0.5-25 X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=refs%2Ftags%2F0.5-25 * grml-autoconfig script: deprecate CONFIG_KERNEL, CONFIG_LANGUAGE, CONFIG_DMA and CONFIG_MIXER as they are not really relevant on hd installations. * Do not use swap by default anymore, thanks for feedback goes to Wolfgang Karall! * Set mailaddress when creating /etc/mdadm/mdadm.conf so mdadm's initscripts do not report warnings anymore on hd-installations. --- diff --git a/autoconfig b/autoconfig index a307b7e..513703c 100644 --- a/autoconfig +++ b/autoconfig @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Fre Nov 10 00:37:37 CET 2006 [mika] +# Latest change: Don Nov 16 20:20:59 CET 2006 [mika] ################################################################################ ################################################################################ @@ -13,7 +13,7 @@ # de-/activate a check! # # If you want to deactivate an option just set it to 'no'. -# +# # Take a look at the script 'grml-autoconfig' as well! ################################################################################ @@ -30,9 +30,6 @@ # default: Lat15-Terminus16 # CONSOLEFONT='iso15graf-16' -# display information on running kernel -CONFIG_KERNEL='yes' - # check for network devices and run dhclient CONFIG_DHCP='yes' @@ -45,13 +42,6 @@ CONFIG_FSTAB='yes' # load ACPI/APM modules CONFIG_ACPI_APM='yes' -# Enable DMA for all IDE drives - already done in initrd -# but make sure it's done also on harddisk-installed systems -CONFIG_DMA='yes' - -# set audio volumes -CONFIG_MIXER='yes' - # start syslog-ng CONFIG_SYSLOG='yes' @@ -71,6 +61,7 @@ CONFIG_BLIND='yes' # check for blind option or brltty CONFIG_CDROM_PERM='yes' # for burning on IDE-CD-Roms, k3b (and others) check for special permissions CONFIG_CDROM_SCRIPTS='yes' # run scripts from /cdrom/scripts CONFIG_CONSOLE='yes' # activate mgetty when using console=... as bootparam +CONFIG_DMA='yes' # Enable DMA for all IDE drives CONFIG_CREATE_MNT_DIRS='no' # create /mnt-directories CONFIG_DEBNET='yes' # search for /etc/network/interfaces on partitions and set up network afterwards CONFIG_DEBS='yes' # check for bootoption debs for installing .debs @@ -92,10 +83,12 @@ CONFIG_HOTPLUG_AGENT='no' # deactivate specific hotplug agent(s) via bootpar CONFIG_HOTPLUG_BLACKLIST='no' # check for blacklist bootparam CONFIG_HWINFO='no' # run hwinfo for module-detection (requires bootparam 'hwinfo'!) CONFIG_INTERACTIVE='yes' # check for expert-mode as bootparam +CONFIG_KERNEL='yes' # display information on running kernel CONFIG_LANGUAGE='yes' # allow language specification via commandline CONFIG_LD_MOD='yes' # run ldconfig and depmod on systems running from harddisk; remove /etc/grml.first.boot for forcing CONFIG_LOCAL_NET='yes' # bring up loopback interface CONFIG_LOG='yes' # DEBUG=/dev/null or logfile int /tmp/... +CONFIG_MIXER='yes' # set audio volumes [only in live-cd mode relevant, except for bootoption nosound] CONFIG_MODEM='yes' # check for AC'97 Modem Controller modem CONFIG_MODULES='yes' # load modules specified in /etc/grml/modules CONFIG_MOUSE='yes' # show mouse information (expert-mode) diff --git a/autoconfig.functions b/autoconfig.functions index e69b041..344929b 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -897,7 +897,7 @@ check_partitions 1>/dev/null 2>&1 # avoid output "check_partitions:3: read-only # }}} # {{{ Enable DMA for all IDE drives now if not disabled -# Notice: Already done by linuxrc, maybe not on hd-installations +# Notice: Already done by linuxrc, but make sure it's done also on harddisk-installed systems config_dma(){ if checkbootparam "nodma"; then ewarn "Skipping DMA accelleration as requested on boot commandline." ; eend 0 @@ -920,9 +920,9 @@ fi # {{{ Start creating /etc/fstab with HD partitions and USB SCSI devices now config_fstab(){ -NOSWAP="" -if checkbootparam "noswap" -o checkbootparam "forensic" ; then - NOSWAP="yes" +NOSWAP="yes" # we do not use swap by default! +if checkbootparam "swap" -o checkbootparam "anyswap" ; then + NOSWAP='' fi if checkbootparam "nofstab" -o checkbootparam "forensic" ; then @@ -943,8 +943,8 @@ else fi fi # Scan for swap, config, homedir -if [ -z "$NOSWAP" -o -z "$INSTALLED" ]; then - einfo "Checking for swap partition(s)." +if [ -z "$NOSWAP" ]; then + einfo "Searching for swap partition(s) as requested." fi GRML_IMG="" GRML_SWP="" @@ -1897,10 +1897,12 @@ config_swraid(){ eerror "mdadm not available, can not execute it." ; eend 1 else + # if ! egrep -qv '^(MAILADDR.*|#.*|)$' /etc/mdadm/mdadm.conf 2>>$DEBUG ; then + # find out whether we have a valid configuration file already if ! grep -q ARRAY /etc/mdadm/mdadm.conf 2>>$DEBUG ; then einfo "Creating /etc/mdadm/mdadm.conf" [ -r /etc/mdadm/mdadm.conf ] && mv /etc/mdadm/mdadm.conf /etc/mdadm/mdadm.conf.old - /usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf ; eend $? + MDADM_MAILADDR='root' /usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf ; eend $? else ewarn "/etc/mdadm/mdadm.conf looks like a configured mdadm setup, will not touch it." ; eend 0 fi diff --git a/autoconfig.small b/autoconfig.small index cf6e9e0..8de1b73 100644 --- a/autoconfig.small +++ b/autoconfig.small @@ -3,7 +3,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Fre Nov 10 00:37:44 CET 2006 [mika] +# Latest change: Don Nov 16 20:20:59 CET 2006 [mika] ################################################################################ ################################################################################ @@ -13,7 +13,7 @@ # de-/activate a check! # # If you want to deactivate an option just set it to 'no'. -# +# # Take a look at the script 'grml-autoconfig' as well! ################################################################################ @@ -30,9 +30,6 @@ # default: Lat15-Terminus16 # CONSOLEFONT='iso15graf-16' -# display information on running kernel -CONFIG_KERNEL='yes' - # check for network devices and run dhclient CONFIG_DHCP='yes' @@ -45,13 +42,6 @@ CONFIG_FSTAB='yes' # load ACPI/APM modules CONFIG_ACPI_APM='yes' -# Enable DMA for all IDE drives - already done in initrd -# but make sure it's done also on harddisk-installed systems -CONFIG_DMA='yes' - -# set audio volumes -CONFIG_MIXER='no' - # start syslog-ng CONFIG_SYSLOG='yes' @@ -71,6 +61,7 @@ CONFIG_BLIND='yes' # check for blind option or brltty CONFIG_CDROM_PERM='yes' # for burning on IDE-CD-Roms, k3b (and others) check for special permissions CONFIG_CDROM_SCRIPTS='yes' # run scripts from /cdrom/scripts CONFIG_CONSOLE='yes' # activate mgetty when using console=... as bootparam +CONFIG_DMA='yes' # Enable DMA for all IDE drives CONFIG_CREATE_MNT_DIRS='no' # create /mnt-directories CONFIG_DEBNET='yes' # search for /etc/network/interfaces on partitions and set up network afterwards CONFIG_DEBS='yes' # check for bootoption debs for installing .debs @@ -92,10 +83,12 @@ CONFIG_HOTPLUG_AGENT='no' # deactivate specific hotplug agent(s) via bootpar CONFIG_HOTPLUG_BLACKLIST='no' # check for blacklist bootparam CONFIG_HWINFO='no' # run hwinfo for module-detection (requires bootparam 'hwinfo'!) CONFIG_INTERACTIVE='yes' # check for expert-mode as bootparam +CONFIG_KERNEL='yes' # display information on running kernel CONFIG_LANGUAGE='yes' # allow language specification via commandline CONFIG_LD_MOD='yes' # run ldconfig and depmod on systems running from harddisk; remove /etc/grml.first.boot for forcing CONFIG_LOCAL_NET='yes' # bring up loopback interface CONFIG_LOG='yes' # DEBUG=/dev/null or logfile int /tmp/... +CONFIG_MIXER='no' # set audio volumes [only in live-cd mode relevant, except for bootoption nosound] CONFIG_MODEM='yes' # check for AC'97 Modem Controller modem CONFIG_MODULES='yes' # load modules specified in /etc/grml/modules CONFIG_MOUSE='yes' # show mouse information (expert-mode) diff --git a/debian/changelog b/debian/changelog index eb07d36..1902813 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +grml-autoconfig (0.5-25) unstable; urgency=low + + * grml-autoconfig script: deprecate CONFIG_KERNEL, CONFIG_LANGUAGE, + CONFIG_DMA and CONFIG_MIXER as they are not really relevant on hd + installations. + * Do not use swap by default anymore, thanks for feedback goes to + Wolfgang Karall! + * Set mailaddress when creating /etc/mdadm/mdadm.conf so mdadm's + initscripts do not report warnings anymore on hd-installations. + + -- Michael Prokop Thu, 16 Nov 2006 20:23:45 +0100 + grml-autoconfig (0.5-24) unstable; urgency=low * Added support for Norsk environment, thanks to Arnt Karlsen! diff --git a/sbin/grml-autoconfig b/sbin/grml-autoconfig index 02a655f..57e7601 100755 --- a/sbin/grml-autoconfig +++ b/sbin/grml-autoconfig @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Die Sep 26 12:26:05 CEST 2006 [mika] +# Latest change: Don Nov 16 20:24:16 CET 2006 [mika] ################################################################################ if [ "$UID" != 0 ]; then @@ -39,15 +39,11 @@ check_setting() check_current_state() { grep -q '^CONFIG_DHCP=.*yes' $AUTOCONFIG && DHCPSTATUS=ON || DHCPSTATUS=OFF - grep -q '^CONFIG_ACPI_APM=.*yes' $AUTOCONFIG && ACPI_APMSTATUS=ON || ACPI_APMSTATUS=OFF + grep -q '^CONFIG_FSTAB=.*yes' $AUTOCONFIG && FSTABSTATUS=ON || FSTABSTATUS=OFF grep -q '^CONFIG_CPU=.*yes' $AUTOCONFIG && CPUSTATUS=ON || CPUSTATUS=OFF + grep -q '^CONFIG_ACPI_APM=.*yes' $AUTOCONFIG && ACPI_APMSTATUS=ON || ACPI_APMSTATUS=OFF grep -q '^CONFIG_SYSLOG=.*yes' $AUTOCONFIG && SYSLOGSTATUS=ON || SYSLOGSTATUS=OFF grep -q '^CONFIG_GPM=.*yes' $AUTOCONFIG && GPMSTATUS=ON || GPMSTATUS=OFF - grep -q '^CONFIG_KERNEL=.*yes' $AUTOCONFIG && KERNELSTATUS=ON || KERNELSTATUS=OFF - grep -q '^CONFIG_FSTAB=.*yes' $AUTOCONFIG && FSTABSTATUS=ON || FSTABSTATUS=OFF - grep -q '^CONFIG_LANGUAGE=.*yes' $AUTOCONFIG && LANGUAGESTATUS=ON || LANGUAGESTATUS=OFF - grep -q '^CONFIG_DMA=.*yes' $AUTOCONFIG && DMASTATUS=ON || DMASTATUS=OFF - grep -q '^CONFIG_MIXER=.*yes' $AUTOCONFIG && MIXERSTATUS=ON || MIXERSTATUS=OFF } # main program @@ -64,30 +60,22 @@ All the configuration happens in the file /etc/grml/autoconfig - you can edit it manually as well. " 0 0 0 \ dhcp "check for network devices and run pump (get ip-address via DHCP)" $DHCPSTATUS \ -acpi_apm "load ACPI/APM modules" $ACPI_APMSTATUS \ +fstab "update /etc/fstab entries (check for devices)" $FSTABSTATUS \ cpufreq "activate cpydyn/powernowd for frequency-scalable CPUs" $CPUSTATUS \ +acpi_apm "load ACPI/APM modules" $ACPI_APMSTATUS \ syslog "start syslog-ng" $SYSLOGSTATUS \ gpm "start GPM (mouse on console)" $GPMSTATUS \ -kernel "display information on running kernel" $KERNELSTATUS \ -fstab "update /etc/fstab entries (check for devices)" $FSTABSTATUS \ -language "run loadkeys / consolechars" $LANGUAGESTATUS \ -dma "enable DMA for all IDE drives" $DMASTATUS \ -mixer "set audio volumes" $MIXERSTATUS \ 2>$TMPFILE } set_values() { check_setting dhcp && activate_value CONFIG_DHCP || deactivate_value CONFIG_DHCP - 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 check_setting syslog && activate_value CONFIG_SYSLOG || deactivate_value CONFIG_SYSLOG check_setting gpm && activate_value CONFIG_GPM || deactivate_value CONFIG_GPM - check_setting kernel && activate_value CONFIG_KERNEL || deactivate_value CONFIG_KERNEL - check_setting fstab && activate_value CONFIG_FSTAB || deactivate_value CONFIG_FSTAB - check_setting language && activate_value CONFIG_LANGUAGE || deactivate_value CONFIG_LANGUAGE - check_setting dma && activate_value CONFIG_DMA || deactivate_value CONFIG_DMA - check_setting mixer && activate_value CONFIG_MIXER || deactivate_value CONFIG_MIXER } # and now run it: