bootdisk/trunk/batch-installer/installer-prep

hawk cvs at pld-linux.org
Wed Dec 7 00:26:58 CET 2005


Author: hawk
Date: Wed Dec  7 00:26:52 2005
New Revision: 6606

Modified:
   bootdisk/trunk/batch-installer/installer-prep
Log:
- do not write ide-generic to modules.conf/modprobe.conf
- moved back load_device_modules basename checking
- comments cosmetics


Modified: bootdisk/trunk/batch-installer/installer-prep
==============================================================================
--- bootdisk/trunk/batch-installer/installer-prep	(original)
+++ bootdisk/trunk/batch-installer/installer-prep	Wed Dec  7 00:26:52 2005
@@ -387,13 +387,16 @@
 
   local detected_ide detectded_scsi
   detected_ide=`detect-pci-devices ide -m`
+  detected_ide="$detected_ide ide-generic"
   detected_scsi=`detect-pci-devices scsi -m`
 
-  # go through list of modules and load them, skip or call required functions
+  # go through list of modules...
   for module in $1; do
 
+    # skip if ide-generic
     if test "x$module" = "xide-generic"; then
       : skip
+    # for some raid modules we must call proper function
     elif test "x$module" = "xcpqarray"; then
       . installer-raid-functions
       setup_cpqarray
@@ -409,6 +412,7 @@
     elif test "x$module" = "xi2o_block"; then
       . installer-raid-functions
       setup_i2o
+    # for all others we simply need to load module
     else
       load_module $module
     fi
@@ -416,20 +420,24 @@
   done
 
   # check if any of modules to be loaded is for IDE device
-  # and if it is, load module ide-disk 
+  # and if it is, load module ide-detect and ide-disk
+  # also write entries to modules.conf/modprobe.conf
   for ide in $detected_ide; do
     if echo "$1" | grep -q $ide; then
-      ## write info about ide adapters into modules.conf/modprobe.conf
-      for i in /etc/modules.conf /etc/modprobe.conf; do
-        if ! cat $i 2> /dev/null | grep -q "^alias ide_hostadapter"; then
-          test ! -f $i || cp $i $i.tmp
-          echo "alias ide_hostadapter $ide" >> $i.tmp
-          # alias for devfsd
-          echo "alias ide-hosts $ide" >> $i.tmp
-          sort $i.tmp | uniq > $i
-          rm -f $i.tmp
-        fi
-      done
+      # if not ide-generit then write info about ide adapters
+      # into modules.conf/modprobe.conf
+      if test "x$ide" != "xide-generic"; then
+        for i in /etc/modules.conf /etc/modprobe.conf; do
+          if ! cat $i 2> /dev/null | grep -q "^alias ide_hostadapter"; then
+            test ! -f $i || cp $i $i.tmp
+            echo "alias ide_hostadapter $ide" >> $i.tmp
+            # alias for devfsd
+            echo "alias ide-hosts $ide" >> $i.tmp
+            sort $i.tmp | uniq > $i
+            rm -f $i.tmp
+          fi
+        done
+      fi
       # check if ide-detect is loaded and if not, load it
       if lsmod | grep -q '^ide-detect ' ; then
         : skip
@@ -499,6 +507,9 @@
 # invoked as load_nodule runs function load_module,
 if test "x`basename $0 || :`" = "xload_module"; then 
     load_module "$@"; exit $?
+# invoked as load_device_modules, runs function load_device_modules
+elif test "x`basename $0`" = "xload_device_modules"; then
+    load_device_modules "$@"; exit $?
 elif test "x`basename $0 || :`" = "xinstaller-prep-source"; then
     # only source (and net) parts are prepared
     source_only=yes
@@ -575,9 +586,6 @@
 # invoked as load_package runs function load_package,
 if test "x`basename $0 || :`" = "xload_package"; then 
     load_package "$@"; exit $?
-# invoked as load_device_modules, runs function load_device_modules
-elif test "x`basename $0`" = "xload_device_modules"; then
-    load_device_modules "$@"; exit $?
 fi
 
 # modules for source/destination devices should be loaded by now



More information about the pld-cvs-commit mailing list