X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=317323c9c4f711051751d17cb660c1171223b03a;hp=9218b7b0f63e136ab99ac541ac714ee450f1e644;hb=f2e718518cd811284a9b14a67fe3978deaa5a378;hpb=8f1a96e977ce1ea9bf38523717a2331ad0e027a9 diff --git a/autoconfig.functions b/autoconfig.functions index 9218b7b..317323c 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Klaus Knopper , (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2. -# Latest change: Mit Jul 11 19:34:06 CEST 2007 [mika] +# Latest change: Mit Jul 25 18:59:49 CEST 2007 [mika] ################################################################################ # {{{ path, variables, signals, umask, zsh @@ -700,7 +700,7 @@ if checkbootparam "blacklist" ; then echo "alias $BLACK off" >> /etc/modprobe.d/grml echo "# end entry generated by config_blacklist of grml-autoconfig" >> /etc/modprobe.d/grml ; eend $? else - eerror "No given module for blacklist found. Blacklisting will not work therefor." + eerror "No given module for blacklist found. Blacklisting will not work therefore." fi else ewarn "Backlisting via bootoption does not work on harddisk installations." ; eend 1 @@ -716,9 +716,11 @@ fi config_acpi_apm(){ if [ -d /proc/acpi ]; then if checkbootparam "noacpi"; then - ewarn "Skipping ACPI Bios detection as requested on boot commandline." ; eend 0 + ewarn "Skipping ACPI Bios detection as requested via noacpi on boot commandline." ; eend 0 + elif checkbootparam "nogrmlacpi" ; then + ewarn "Skipping ACPI Bios detection as requested via nogrmlacpi on boot commandline." ; eend 0 else - einfo "ACPI Bios found, activating modules: " + einfo "ACPI Bios found, activating modules (disable via bootoption noacpi / nogrmlacpi): " eindent found="" for a in /lib/modules/$KERNEL/kernel/drivers/acpi/*; do @@ -994,12 +996,12 @@ fi config_fstab(){ NOSWAP="yes" # we do not use swap by default! -if checkbootparam "swap" -o checkbootparam "anyswap" ; then +if checkbootparam "swap" || checkbootparam "anyswap" ; then NOSWAP='' checkbootparam "anyswap" && export ANYSWAP='yes' || export ANYSWAP="" fi -if checkbootparam "nofstab" -o checkbootparam "forensic" ; then +if checkbootparam "nofstab" || checkbootparam "forensic" ; then ewarn "Skipping /etc/fstab creation as requested on boot commandline." ; eend 0 else einfo "Scanning for harddisk partitions and creating /etc/fstab. (Disable this via boot option: nofstab)" @@ -1169,6 +1171,10 @@ else sleep 1 eend 0 done + if [ -n "$INSTALLED" ] ; then + ewarn 'If you want to disable automatic DHCP requests set CONFIG_DHCP=no in /etc/grml/autoconfig.' + eend 0 + fi fi } # }}} @@ -1466,6 +1472,11 @@ if ! [ -x /usr/bin/aumix ] ; then eerror "aumix binary not available. Can not set sound volumes therefore." ; eend 1 else + if ! [ -r /proc/asound/cards ] ; then + ewarn "No soundcard present, skipping mixer settings therefore." ; eend 0 + return + fi + if checkbootparam vol ; then VOL="$(getbootparam 'vol' 2>>$DEBUG)" if [ -z "$VOL" ] ; then @@ -1520,11 +1531,10 @@ if checkbootparam "nomodem"; then ewarn "Skipping check for AC97 modem controller as requested on boot commandline." ; eend 0 else if [ -x /etc/init.d/sl-modem-daemon ] ; then - if lspci | grep Intel | grep -q "AC'97 Modem Controller" ; then - einfo "AC97 modem controller detected. Starting sl-modem-daemon in background." - /etc/init.d/sl-modem-daemon start >>$DEBUG & - eend 0 - fi + if lspci | grep Intel | grep -q "AC'97 Modem Controller" ; then + einfo "AC97 modem controller detected. Start it running 'Start sl-modem-daemon'." + eend 0 + fi fi fi } @@ -1748,7 +1758,7 @@ fi } config_automount(){ -if checkbootparam noautoconfig -o checkbootparam forensic ; then +if checkbootparam noautoconfig || checkbootparam forensic ; then ewarn "Skipping running automount of device(s) labeled GRMLCFG as requested." ; eend 0 else if [ -z "$INSTALLED" ] ; then @@ -2029,8 +2039,8 @@ fi config_swraid(){ if [ -z "$INSTALLED" ] ; then # notice: checkbootparam "forensic" is just for users who don't know how to really use the bootoption - if checkbootparam 'noraid' -o checkbootparam 'noswraid' -o \ - checkbootparam 'forensic' -o checkbootparam 'raid=noautodetect' ; then + if checkbootparam 'noraid' || checkbootparam 'noswraid' -o \ + checkbootparam 'forensic' || checkbootparam 'raid=noautodetect' ; then ewarn "Skipping SW-RAID code as requested on boot commandline." ; eend 0 else if ! [ -x /sbin/mdadm ] ; then @@ -2167,6 +2177,19 @@ fi } # }}} +# {{{ check for broken ipw3945 driver which causes problems (especially on hd install) +config_ipw3945() { + if grep -q ipw3945 /proc/modules ; then + if ! iwconfig 2>/dev/null| grep -qe 'IEEE 802' -qe 'unassociated' ; then + ewarn "Broken ipw3945 network interface found, reloading module." + rmmod ipw3945 + modprobe ipw3945 + eend $? + fi + fi +} +# }}} + # {{{ disable console blanking config_blanking(){ if checkbootparam "noblank" ; then