Ticket #362: mindi-kern.patch
File mindi-kern.patch, 1.9 KB (added by , 15 years ago) |
---|
-
(a) old-mindi vs. (b) mindi
a b 751 751 752 752 753 753 ListKernelModulePaths() { 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 755 756 oss="/root/oss/modules" 756 757 module_list="$MODULES" 757 758 # Remove unwanted modules from list … … 772 773 ### 773 774 ### Sq-Mod End 774 775 ### 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 776 783 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 778 805 [ "$r" ] && echo "$r" 779 806 [ -f "$oss" ] && find $oss | grep -F $module 780 807 done … … 2563 2590 /usr/sbin/esxcfg-module -l >> $LOGFILE 2564 2591 MODULES="$MODULES `/usr/sbin/esxcfg-module -l | awk '{print $1}'`" 2565 2592 fi 2593 LIVE_MODULES="$MODULES" 2566 2594 echo "FORCE_MODS:" >> $LOGFILE 2567 2595 echo "-------------" >> $LOGFILE 2568 2596 echo $FORCE_MODS >> $LOGFILE