Changeset 1399


Ignore:
Timestamp:
May 7, 2007, 10:21:32 AM (12 years ago)
Author:
bruno
Message:
  • Fix a bug on lsmod | sed. (Andree Leidenfrost). As a consequence, lsmod is not used anymore in mindi (except for log). Replaced by /proc/modules. And the MODULES variable is now used to avoid code duplication.
Location:
branches/2.2.4/mindi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.4/mindi/mindi

    r1354 r1399  
    7272#DENY_MODS="MPS_Driver_Mapper mps octtldrv tscttl streams"
    7373DENY_MODS=""
    74 # Force soma modules to be included
     74# Force some modules to be included
    7575FORCE_MODS=""
    7676
     
    939939    local module_list module fname oss r kern
    940940    oss="/root/oss/modules"
    941     module_list="`lsmod | sed -n '2,$s/ .*//'`"
     941    module_list="$MODULES"
    942942    # Remove unwanted modules from list
    943943    for i in $DENY_MODS; do
     
    976976            if echo $fname | grep lvm &> /dev/null ; then
    977977                echo "This warning only affects you if you are using LVM." >> $LOGFILE
    978                 if lsmod | grep lvm &> /dev/null ; then
     978                if echo "$MODULES" | grep lvm &> /dev/null ; then
    979979                    echo "I think you are, so please take heed!" >> $LOGFILE
    980980#                   LogIt "Where is liblvm? You need it."
     
    11281128    echo -en "for outerloop in 1 2 3 4 5 ; do\necho -en \".\"\n" >> $outfile
    11291129    # BERLIOS: That code is duplicated - Should be done once only
    1130     list_to_echo="`lsmod | sed -n '2,$s/ .*//'`"
     1130    list_to_echo="$MODULES"
    11311131    # Remove unwanted modules from list
    11321132    for i in $DENY_MODS; do
     
    26012601    fi
    26022602
    2603     lsmod > tmp/original-lsmod.txt
    2604    
    26052603    cp --parents -Rdf /dev/fd0*[1,2][4,7,8]* . 2> /dev/null
    26062604    cd $old_pwd
     
    27222720WhichOfTheseModulesAreLoaded() {
    27232721    local modname loaded_modules
    2724     loaded_modules=" `lsmod | tr -s ' ' '\t' | cut -f1 | grep -Fvx "Modules" | tr '\n' ' '` "
     2722    loaded_modules="$MODULES"
    27252723    for modname in $1 ; do
    27262724        [ "`echo "$loaded_modules" | grep -F " $modname "`" ] && echo "$modname"
     
    28942892echo "-------------" >> $LOGFILE
    28952893lsmod >> $LOGFILE
     2894MODULES="`cat /proc/modules | awk '{print $1}'`"
    28962895echo "-------------" >> $LOGFILE
    28972896echo "Liste of extra modules is:" >> $LOGFILE
  • branches/2.2.4/mindi/rootfs/sbin/init

    r1315 r1399  
    527527#-------------------------------
    528528
    529 lsmod > /tmp/ramdisk-lsmod.txt 2> /dev/null
    530 cut -d' ' -f1 /tmp/original-lsmod.txt /tmp/original-lsmod.txt /tmp/ramdisk-lsmod.txt | sort | uniq -d > /tmp/missing-modules.txt
    531 echo "Warning - these modules did not make it onto the ramdisk" >> $LOGFILE
    532 cat /tmp/missing-modules.txt >> $LOGFILE
     529echo "Result of lsmod" >> $LOGFILE
     530echo "---------------" >> $LOGFILE
     531lsmod >> $LOGFILE
    533532
    534533#ctrlaltdel soft
Note: See TracChangeset for help on using the changeset viewer.