[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Please make discover2 udebs available for testing



[Petter Reinholdtsen]
>   developer:~# discover --data-path=linux/module/name \
>     --data-version=2.4 -t -d all -e ata -e pci -e pcmcia -e scsi display
>   --data-version has no meaning without --data-path.

I found the problem.  Removing '-t' got rid of this error.  But I get
two empty lines instead of any kernel module info.  I would expect one
empty line, as the --type-summary run only listed one card.

On an unrelated note.  I believe we really _need_ the --format option
from discover1.  The example from xfree86 postinst uses the 'paste'
function, but it is missing in busybox.  The current code in hw-detect
look like this:

  discover_hw () {
    # Ugh, Discover 1.x didn't exit with nonzero status if given an
    # unrecongized option!
    DISCOVER_TEST=$(discover --version 2> /dev/null)
    if expr "$DISCOVER_TEST" : 'discover 2.*' > /dev/null 2>&1; then
        # Discover 2.x
        # XXX: This is copied from xfree86, and do not work yet

        log "Using discover2 do not work yet."

        dpath=linux/module/name
        dver=`uname -r|cut -d. -f1,2` # Kernel version (ie 2.4)
        dflags="-d all -e ata -e pci -e pcmcia -e scsi display"

	# Use fixed name temp files, as 'tempfile' is missing from busybox
        VENDOR_MODEL_FILE=/tmp/discover-vendor.txt
        DRIVER_FILE=/tmp/discover-driver.txt

        discover --type-summary $dflags > $VENDOR_MODEL_FILE
        discover --data-path=$dpath --data-version=$dver $dflags > $DRIVER_FILE
        paste $VENDOR_MODEL_FILE $DRIVER_FILE
        rm -f $VENDOR_MODEL_FILE $DRIVER_FILE
    else
        # must be Discover 1.x
        /sbin/discover --format="%m\t%V %M\n" \
            --disable-all --enable=pci,ide,scsi,pcmcia scsi cdrom ethernet |
	  sed 's/ $//'
    fi
  }

I want the code to handle v2 to be as short and easy to handle as the
v1 code.



Reply to: