Ticket #362: mindi-kern.patch

File mindi-kern.patch, 1.9 KB (added by Matthew Cline, 15 years ago)

Patch against mindi 2.0.6-1

  • (a) old-mindi vs. (b) mindi

    a b  
    751751
    752752
    753753ListKernelModulePaths() {
    754     local module_list module fname oss r kern
     754    local module_list module fname oss r kern path regexp dash_fudging
     755    local unique_list
    755756    oss="/root/oss/modules"
    756757    module_list="$MODULES"
    757758    # Remove unwanted modules from list
     
    772773###
    773774### Sq-Mod End
    774775###
    775     for module in $module_list $EXTRA_MODS ; do
     776    # Get rid of duplicates, so that if a live kernel module also appears
     777    # in $EXTRA_MODS that it won't get reported as "live module file not
     778    # found" twice.
     779    unique_list="`echo $module_list $EXTRA_MODS | tr ' ' '\n'`"
     780    unique_list="`echo "$unique_list" | sort -u`"
     781    for module in $unique_list ; do
     782        dash_fudging=0
    776783        r=`find /lib/modules/$kern -type f | grep "/${module}\..*o" | tail -n1`
    777         echo "module $module --> $r" >> $LOGFILE
     784        # For some modules on some systems, the module name uses a '_', but
     785        # the module file uses a '-'.
     786        if [ -z "$r" ] && [[ $module == *_* ]]; then
     787            regexp="`echo $module | sed s/_/[_-]/g`"
     788            r=`find /lib/modules/$kern -type f | grep "/${regexp}\..*o" | tail -n1`
     789            if [ "$r" ]; then
     790                dash_fudging=1
     791            fi
     792        fi
     793        path="$r"
     794        if [ -z "$path" ]; then
     795            if [ "`echo "$LIVE_MODULES" | grep ^${module}$`" ]; then
     796                path="[live module file not found]"
     797            else
     798                path="[extra module file not found]"
     799            fi
     800        fi
     801        echo "module $module --> $path" >> $LOGFILE
     802        if [ $dash_fudging -eq 1 ]; then
     803            echo "NOTE: Some of the '_'s in module $module are '-'s in the file name" >> $LOGFILE
     804        fi
    778805        [ "$r" ] && echo "$r"
    779806        [ -f "$oss" ] && find $oss | grep -F $module
    780807    done
     
    25632590    /usr/sbin/esxcfg-module -l >> $LOGFILE
    25642591    MODULES="$MODULES `/usr/sbin/esxcfg-module -l | awk '{print $1}'`"
    25652592fi
     2593LIVE_MODULES="$MODULES"
    25662594echo "FORCE_MODS:" >> $LOGFILE
    25672595echo "-------------" >> $LOGFILE
    25682596echo $FORCE_MODS >> $LOGFILE