Changeset 300 for trunk/mindi/mindi


Ignore:
Timestamp:
Jan 11, 2006, 2:20:38 PM (14 years ago)
Author:
bcornec
Message:

merge -r295:299 $SVN_M/branches/2.06

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mindi/mindi

    r292 r300  
    10251025    local module_list module fname oss r kern
    10261026    oss="/root/oss/modules"
    1027     module_list=`ListKernelModules`
     1027    module_list="`lsmod | sed -n '2,$s/ .*//p'`"
    10281028###
    10291029### Sq-Modification ... Use kernelname for module search path if specified
     
    10321032    if [ "${kernelname}" != "" -a "${kernelname}" != "FAILSAFE" ]
    10331033    then
    1034       kern=${kernelname}
    1035     else
    1036       kern="`uname -r`"
     1034        kern=${kernelname}
     1035    else
     1036        kern="`uname -r`"
    10371037    fi
    10381038###
     
    10411041    for module in $module_list $EXTRA_MODS ; do
    10421042        r=`find /lib/modules/$kern -type f | grep "/${module}\..*o" | tail -n1`
    1043     echo "module $module --> $r" >> $LOGFILE
    1044     [ "$r" ] && echo "$r"
    1045     [ -f "$oss" ] && find $oss | fgrep $module
     1043        echo "module $module --> $r" >> $LOGFILE
     1044        [ "$r" ] && echo "$r"
     1045        [ -f "$oss" ] && find $oss | fgrep $module
    10461046    done
    10471047    find /lib/modules/$kern/modules.* -type f 2> /dev/null
     
    10511051
    10521052
    1053 ListKernelModules() {
    1054     local output q
    1055     output=""
    1056     for q in `lsmod | sed -n '2,$s/ .*//p'` ; do
    1057     output="$q $output"
    1058     done
    1059     echo "$output"
    1060 }
     1053#ListKernelModules() {
     1054    #local output q
     1055    #output=""
     1056    #for q in `lsmod | sed -n '2,$s/ .*//p'` ; do
     1057        #output="$q $output"
     1058    #done
     1059    #echo "`lsmod | sed -n '2,$s/ .*//p'`"
     1060#}
    10611061
    10621062
     
    12351235   
    12361236    echo -en "for outerloop in 1 2 3 4 5 ; do\necho -en \".\"\n" >> $outfile
    1237     list_to_echo="`ListKernelModules`"
     1237    list_to_echo="`lsmod | sed -n '2,$s/ .*//p'`"
    12381238#    LTE=`echo "$list_to_echo" | tr ' ' '\n' | grep -n "" | cut -d':' -f2,3,4 | tr '\n' ' '`
    12391239#    lte_old="$LTE"
     
    12451245    # Make temporary modprobe.conf file if we are told so
    12461246    if [ $tmpmodprobe_flag == "Y" ] ; then
    1247     infile="/tmp/modprobe.conf.mindi.$$"
    1248     find /etc/modprobe.d -maxdepth 1 -name "*" -xtype f > $infile
    1249     else
    1250     infile="/etc/modules.conf"
     1247        infile="/tmp/modprobe.conf.mindi.$$"
     1248        find /etc/modprobe.d -maxdepth 1 -name "*" -xtype f > $infile
     1249    else
     1250        infile="/etc/modules.conf"
    12511251    fi
    12521252    for module in $list_to_echo $EXTRA_MODS ; do
    1253     params=`sed -n "s/^options \\+$module \\+//p" $infile`
    1254     modpaths=`FindSpecificModuleInPath $searchpath $module`
    1255     for i in $modpaths ; do
    1256         echo "MyInsmod $i $params > /dev/null 2> /dev/null" \
    1257             | tr '.' '#' \
    1258             | sed s/#o#gz/#o/ \
    1259             | sed s/#o#gz/#o/ \
    1260             | sed s/#ko#gz/#ko/ \
    1261             | sed s/#ko#gz/#ko/ \
     1253        params=`sed -n "s/^options \\+$module \\+//p" $infile`
     1254        modpaths=`FindSpecificModuleInPath $searchpath $module`
     1255        for i in $modpaths ; do
     1256            echo "MyInsmod $i $params > /dev/null 2> /dev/null" \
     1257                | tr '.' '#' \
     1258                | sed s/#o#gz/#o/ \
     1259                | sed s/#o#gz/#o/ \
     1260                | sed s/#ko#gz/#ko/ \
     1261                | sed s/#ko#gz/#ko/ \
    12621262                | tr '#' '.' >> $outfile
    1263 
    1264         echo -en "$i added to module list.\n" >> $LOGFILE
    1265     done
     1263            echo -en "$i added to module list.\n" >> $LOGFILE
     1264        done
    12661265    done
    12671266    echo -en "done\n" >> $outfile
     
    12721271    # Remove temporary modprobe.conf file if we have created one
    12731272    if [ $tmpmodprobe_flag == "Y" ] ; then
    1274     rm -f $infile
     1273        rm -f $infile
    12751274    fi
    12761275}
     
    28702869
    28712870
    2872 
    2873 ListUnsavedKernelModules() {
    2874     local fname modules
    2875     fname=/tmp/$RANDOM.$$.$RANDOM
    2876     ListKernelModules > $fname
    2877     lsmod | cut -d' ' -f1 >> $fname
    2878     lsmod | cut -d' ' -f1 >> $fname
    2879     modules=`sort $fname | uniq -d2 | tr '\n' ' '`
    2880     rm -f $fname
    2881     [ "$modules" ] && echo "Unsaved kernel modules: $modules" >> $LOGFILE
    2882 }
     2871# BERLIOS: This function is wrong
     2872# Should be recoded. Desactivated in between
     2873
     2874#ListUnsavedKernelModules() {
     2875    #local fname modules
     2876    #fname=/tmp/$RANDOM.$$.$RANDOM
     2877    #lsmod | sed -n '2,$s/ .*//p' > $fname
     2878    #modules=`sort $fname | uniq -d2 | tr '\n' ' '`
     2879    #rm -f $fname
     2880    #[ "$modules" ] && echo "Unsaved kernel modules: $modules" >> $LOGFILE
     2881#}
    28832882
    28842883
     
    32423241rm -f /tmp/mountlist.txt.$$ $FDISKLOG /tmp/mindilinux
    32433242LogIt "$FRIENDLY_OUTSTRING\n"
    3244 ListUnsavedKernelModules
     3243#ListUnsavedKernelModules
    32453244for mtpt in $FLOPPY_WAS_MOUNTED ; do
    32463245    mount $mtpt
Note: See TracChangeset for help on using the changeset viewer.