Changeset 2006


Ignore:
Timestamp:
Aug 10, 2008, 5:09:53 PM (11 years ago)
Author:
bruno
Message:

Fix #243 parse /etc/modprobe.conf, look for include statements, and then add the included files to the dependency list (Michael Shapiro)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.7/mindi/mindi

    r2005 r2006  
    5151
    5252# ide-probe-mod
    53 IDE_MODS="ide ide-floppy floppy ide-generic ide-detect ide-mod ide-disk ide_disk ide-cd ide_cd ide_cd_mod ide-cs ide-core ide_core edd paride ata_generic ata_piix libata via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks  pata_sis amd74xx"
     53IDE_MODS="ide ide-floppy floppy ide-generic ide-detect ide-mod ide-disk ide_disk ide-cd ide_cd ide_cd_mod ide-cs ide-core ide_core edd paride ata_generic ata_piix libata via82cxxx generic nvidia ahci sata_nv cmd64x pata_amd pata_marvell pata_serverworks pata_sis amd74xx"
    5454PCMCIA_MODS="pcmcia_core ds yenta_socket"
    5555USB_MODS="usb-storage usb-ohci usb-uhci usbcore usb_storage input hid uhci_hcd ehci_hcd uhci-hcd ehci-hcd ohci-hcd ohci_hcd usbkbd usbhid keybdev mousedev libusual scsi_mod"
     
    17491749
    17501750
     1751ParseModprobeForIncludes() {
     1752local MODPROBE_CONF mpincfile includes include
     1753
     1754MODPROBE_CONF=/etc/modprobe.conf
     1755mpincfile=$1
     1756touch $mpincfile
     1757if [ -a $MODPROBE_CONF ]; then
     1758    includes=$(awk '/^[ \t]*include[ \t]+/ {if(NF>=2){print $2}}' $MODPROBE_CONF|sort|uniq)
     1759    if [ -n "$includes" ]; then
     1760        for include in $includes
     1761        do
     1762            if [ -a "$include" ]; then
     1763                echo $include >> $mpincfile
     1764            fi
     1765        done
     1766    fi
     1767fi
     1768}
     1769
     1770
    17511771PrepareDataDiskImages() {
    1752     local needlist bigdir diskdir imagesdir res i j k old_pwd lines lfiles
     1772    local needlist bigdir diskdir imagesdir res i j k old_pwd lines lfiles includefile
    17531773
    17541774    imagesdir=$MINDI_CACHE
     
    17581778    mkdir -p $bigdir/usr/bin
    17591779    mkdir -p $bigdir/usr/sbin
     1780    includefile=$MINDI_TMP/$$.includefile.txt
    17601781
    17611782    lfiles="$DEPLIST_FILE"
    17621783    lines=`grep -vx " *#.*" $lfiles | grep -vx "" | wc -l`
    1763     cat $lfiles | GenerateGiantDependencyList $needlist $lines
     1784    ParseModprobeForIncludes $includefile
     1785    lines=${lines}+`wc -l $includefile`
     1786    cat $lfiles $includefile | GenerateGiantDependencyList $needlist $lines
    17641787    res=$?
     1788    rm -f $includefile
    17651789    if [ "$YOUR_KERNEL_SUCKS" ]; then
    17661790        pwd=`pwd`
Note: See TracChangeset for help on using the changeset viewer.