Fix code regression of checkbootparam
authorMichael Prokop <mika@grml.org>
Wed, 25 Jul 2007 17:27:18 +0000 (19:27 +0200)
committerMichael Prokop <mika@grml.org>
Wed, 25 Jul 2007 17:27:18 +0000 (19:27 +0200)
autoconfig.functions
debian/changelog
grml-autoconfig

index f63815a..317323c 100755 (executable)
@@ -996,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)"
@@ -1758,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
@@ -2039,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
@@ -2180,7 +2180,7 @@ 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 -q 'IEEE 802' ; 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
index 6e0ebc7..52ecd90 100644 (file)
@@ -3,6 +3,7 @@ grml-autoconfig (0.7.11) unstable; urgency=low
   * Rename bootoption splash into "textsplash" (and additionally
     support "tsplash" as well) so users can use graphical splash
     from Debian *or* textsplash of grml.
+  * Fix code regression of checkbootparam (use '||' instead of '-o')
 
  -- Michael Prokop <mika@grml.org>  Wed, 25 Jul 2007 19:12:56 +0200
 
index 8c2ba7e..1686c63 100755 (executable)
@@ -63,7 +63,7 @@ CMDLINE="$(cat /proc/cmdline)"
 checkvalue $CONFIG_DEBUG && config_debug
 
 SPLASH=''
-if checkbootparam "textsplash" -o checkbootparam "tsplash"; then
+if checkbootparam "textsplash" || checkbootparam "tsplash"; then
   SPLASH=1
 fi