--- hotplug.functions 2004-04-10 18:53:02.000000000 +0200 +++ hotplug.functions.isapnp 2004-04-10 18:50:16.150626368 +0200 @@ -77,14 +77,20 @@ FILENAME=$2 DESCRIPTION=$3 + case $TYPE in + isapnp) + LISTER=`which ${TYPE}modules 2> /dev/null` + ;; + *) # should we use usbmodules, pcimodules? not on 2.5+, because sysfs # ought to expose the data we need to find all candidate drivers. # (on 2.5.48 it does for usb; but maybe not yet for pci.) case "$KERNEL" in - 2.2*|2.3*|2.4*) LISTER=`which ${TYPE}modules` ;; + 2.2*|2.3*|2.4*) LISTER=`which ${TYPE}modules 2> /dev/null` ;; *) LISTER="" ;; esac - + esac + if [ "$LISTER" != "" ]; then # lister programs MIGHT be preferable to parsing from shell scripts: # - usbmodules used for (a) multi-interface devices, (b) coldplug @@ -105,12 +111,30 @@ debug_mesg "pcimodules is scanning more than $PCI_SLOT ..." DRIVERS=`$LISTER` ;; + isapnp) + if [ "$ISAPNP_ID" != "" ]; then + debug_mesg "isapnpmodules is scanning for the ISAPNP Id $ISAPNP_ID ..." + DRIVERS=`$LISTER --id $ISAPNP_ID` + elif [ "$ISAPNP_STRING" != "" ]; then + debug_mesg "isapnpmodules is scanning for the ISAPNP String $ISAPNP_STRING ..." + DRIVERS=`$LISTER --string $ISAPNP_STRING` + fi + ;; esac fi # try parsing by shell scripts if no luck yet if [ "$DRIVERS" = "" ]; then + case $TYPE in + isapnp) + if [ "$LISTER" = "" ]; then + ${TYPE}_map_modules < $FILENAME + fi + ;; + *) ${TYPE}_map_modules < $FILENAME + ;; + esac fi # FIXME remove dups and blacklisted modules from $DRIVERS here