#!/bin/bash

UPDATE="2002 Nov 13"

# Short term files have names tmpfile.1 2 3 etc.
if test -z "$TMPM" ; then 
  mkdir -p /tmp/ltmodem
  TMPM=/tmp/ltmodem/tmpfile
fi
echo > $TMPM

if test -z "$RECORD" ; then
  RECORD=/tmp/ltmodem/ModemData.txt
  echo > $RECORD
  echo > $RECORD.2
else
  echo ------------ beginning SCANMODEM section ------ >> $RECORD
fi


cat << END >> $TMPM

 This script utilizes the LSPCI tool from the package:   pciutils 
 to identify potential modem devices in PCI bus slots.
 It will fail to recognize ISA bus modems and 16 bit PCMCIA card modems.
 
 The script originated as the scanPCI script written by Chris Hebeisen 
 to recognize modems with DSP (digital signal processing) chips made by Lucent/Agere. 
 It now aspires to provide useful information on other modems as well,
 recommending URLs with more detailed information or software.
 For the  Lucent/Agere DSP chip modems, System information is used to recommend Installers,
 from the Installer list output from Chris's repository:   http://www.heby.de/ltmodem/

 This script is updated whenever answers to queries can be written into it.
 So if new problems arise, download an update in favor of using a stored version.
 Only the information blocks cogent to your System will be output into
       ModemData.txt   and      ModemData.txt.2
 Should you need assistance after FIRST following all the advice and/or URLs,
 1) browse the general information at:  http://linmodems.technion.ac.il/  and
 2) Please use the SEARCH ENGINE at:  http://linmodems.technion.ac.il/wgindex.html
    Answers to Most Newbie questions are already therein. 
 ONLY thereafter send ModemData.txt to:   discuss@linmodems.org
 ModemData.txt.2  has common information the  List need not be bothered with.

 For USB Modems, restart with:
   ./scanModem USB

 This script can be read with a text browser.
 Blocks of Information with little code begin and end with ###########.
 
 Last update $UPDATE by  Marv Stodolsky. 
 Check for updates at:  http://linmodems.technion.ac.il/packages/scanModem.gz 
 -----------------------------------------------------------------------------------

END

# conditional when scanmodem is used in winmodemlt.deb or .rpm installation
if [ "`basename $0`" != "scanModem" ] ; then
  FAST=yes
fi

if test -z "$FAST" ; then
  cat $TMPM
fi # FAST

if [ "$1" = "USB" ] ; then
  cat<<END> $TMPM
 USB modems will not be detected UNTIL proper USB support is installed.
 See http://www.linux-usb.org/USB-guide/x332.html 
     http://www.idir.net/~gromitkc/usblist.html 

END
 cat  $TMPM
 cat  $TMPM >> $RECORD.2
fi

echo Do NOT send this common information to discuss@linmodems.org > $RECORD.2
echo >> $RECORD.2
cat $TMPM >> $RECORD.2

# BN can be inherited from ./build_module or Installers or checkout
# if BN doesn't exist
if test -z "$BN" ; then 
  BN=`basename $0`
fi

# Define version, within ltmodem CVS maintained by Mark Spieth
VER=8.22a5
case $VER in
        *RELEASE* ) 
                VER=6.00b11
                ;;
        * )
        ;;
esac
LT_VERSION=$VER

# echo "Checking for the core utility:	lspci"
LSPCI_PATH="/bin /usr/bin /sbin"
for i in $LSPCI_PATH
do
  if test -x $i/lspci
  then
    LSPCI=$i/lspci
  fi
done
if test -z $LSPCI
then
  echo "+----------------------------------------------+"
  echo "|    WARNING: lspci not found  - exiting       |"
  echo "+----------------------------------------------+"
  echo
  exit 1
  echo 
else
  if ! $LSPCI &>/dev/null
  then
    echo "WARNING: $LSPCI returned error - not checking for modem"
    echo
    echo Exiting
    echo
    exit 1
  fi
fi
# echo Using $LSPCI
# ending lspci test section


# Defining other needed variables
SYS=`uname -r`
MAJOR=`echo $SYS | cut -d. -f1-2`
KVER=`echo  $SYS | cut -d- -f1`
KEXT=`echo  $SYS | cut -d- -f2-`
# needed for rpm package name parsing
PVER="$KVER"_"$KEXT"
# needed for deb package name parsing
FILTER="$SYS"_
CPU=`uname -m`

if test -z "$DISTR" ; then
# echo "Now acquiring distribution data:"
DISTRO_FILES="redhat-release SuSE-release mandrake-release conectiva-release  \
   bluepoint-release  slackware-version  debian_version"
#   redhat MUST proceed mandrake in this listing as Mandrake has an /etc/redhat-release
for i in $DISTRO_FILES
do
  if [ -a /etc/$i ]; then
    DISTRO=$i
    # generating short name
    DISTR=`ls /etc/$i | cut -d/ -f3 | cut -d"-" -f1`
    if [ "$DISTR" = "debian_version" ] ;then
       DISTR=debian
    fi
    DVERSION=`cat /etc/$i`  
  fi
done
if [ -z $DISTRO ] ; then
  DISTR="Not_identified"
fi
fi # DISTR

  
echo "If further help is needed, send a description of your problem to:	 discuss@linmodems.org">> $RECORD
echo "   with this ModemData.txt Attached." >> $RECORD
echo "using the following in the email Subject Line:" >> $RECORD
SUBJECT="$BN, $DISTR kernel $SYS"
echo "	$SUBJECT" >> $RECORD
echo >> $RECORD
echo System info follows >> $RECORD
echo "==================================================" >> $RECORD
echo $DISTR $DVERSION >> $RECORD
echo "Script executed as:	$BN" >> $RECORD
echo "on system:	`uname -a`" >> $RECORD
echo  LSPCI="$LSPCI" >>  $RECORD
echo UPDATE=$UPDATE >>  $RECORD
echo  >> $RECORD

# Now displaying PCI  devices. 
echo --------- lspci scan ---------------- >> $RECORD
$LSPCI >> $RECORD
echo ------------------------------------- >> $RECORD

# now acquiring PCI bus slots.
PCIBUS=`$LSPCI | cut -d' ' -f1`
# echo $PCIBUS

#  if `$LSPCI | cut -c5` grep "9" > /dev/null ; then
#    echo Should your
#  fi


#  modem related keywords for search of lspci outputs
echo ommunication >  $TMPM 
echo Modem >>  $TMPM 
echo modem >>  $TMPM 
echo erial controller >>  $TMPM
echo Lucent >>  $TMPM 
echo Xircom >>  $TMPM 

for i in $PCIBUS
do
if  $LSPCI -s $i | grep  -f $TMPM >/dev/null || $LSPCI -s $i -n | grep "Class 07" >/dev/null  || $LSPCI -s $i -nv | grep PCTel >/dev/null ; then
#   some  # commented out lines are occassionally restored for development tests
#  echo $i
TESTS=$i" $TESTS"
fi
done
	
# if any candidates are recognized
# echo TESTS=$TESTS
if test -n "$TESTS" ; then
  # For Lucent/Agere DSP modem recognition
  DEVICES="0x11c1:0x0440-0x045c"
  DEVICES=$DEVICES" 0x115d:0x0000-0x000f"
  DEVICES=$DEVICES" 0x115d:0x0440-0x045c"
  DEVICES=$DEVICES" 0x115d:0x0010-0x03ff"

# for AMR modem comments later
cat <<END > $TMPM.1

########
      VendorID:DeviceID == PCI_IDs  of AC'97 soft modem slots  
 ==================================================================
  Vendor 
  ------
  ALI     10b9:5453* 10b9:5457*  have AC97 link controllers suppoting diverse soft modems.
  VIA     1106:3068* -  VIA MC97 controller for AC-Link modems, some supported by PCTEL or Conexant drivers
  SIS     1039:7013  -  see SIS below 
  Lucent  11c1:048c 11c1:048e 11c1:048f - Linux service not yet available in November, 2002
  Intel   8086:2416* 8086:2426 8086:2446* 8086:2486* 8086:7196  * indicate Intel MC97 controller
  -------------------------------------------------------------------------------
   Possible support by soft modem drivers available at:
      * Conexant - http://www.mbsi.ca/cnxtlindrv/hsf/index.html 
      SIS - some supported by  http://pctelcompdb.sourceforge.net/
            some by            ftp://ftp.smlink.com/Update/linux/unsupported/   
  Drivers for Intel 537ep chip soft modems are available at:  http://linmodems.technion.ac.il/resources.html 
    within the section:     Modems based on Intel chips (HaM/536ep). 
    Their soft modem cards may be resident under AC'97 Controllers with the following:

VendorID:DeviceID == PCI_ID     AC'97 Controller 
               subSystemID       name 
   ----------  -----------      ----------------
    E159:0001                   TigerJet 320
    E159:0001  00030359         TJ320 v3.1
    E159:0001  00038086         TJ320 v2.0
    8086:2416                   INTEL 82801AA (ICH)
    8086:2426                   INTEL 82801AB (ICH0)
    8086:2446                   INTEL 82801BA (ICH2)
    8086:2486                   INTEL ICH3
    8086:24C6                   INTEL ICH4
    8086:1040                   S1724
    1543:3052  30001543         SI3052
    1039:7013                   SIS 630
    1039:7018                   SIS 960
    1106:3068                   VIA
    10B9:5450                   ALI 5450
    10B9:5451                   ALI 5451
    10B9:5457                   ALI 5457
    10B9:5459                   ALI 5459

END
###########
  echo > $TMPM
#  echo TESTS=$TESTS
  for x in $TESTS
  do
    # Gathering info on PCI device $x
    PCIDEV=`$LSPCI -s $x -n | cut -d' ' -f4`
#    echo PCIDEV=$PCIDEV
    Vendor=`echo $PCIDEV | cut -d: -f1`
    Device=`echo $PCIDEV | cut -d: -f2`
#    echo Vendor=$Vendor
#    echo Device=$Device
    echo Reading more detail for the Device at: > $TMPM  
    echo PCI bus >> $TMPM
    echo ------- >> $TMPM
    $LSPCI -s $x -n >> $TMPM 
    SUBSYS=`$LSPCI -s $x -nv | grep Subsystem | cut -d' ' -f2`
    SUBven=`echo $SUBSYS | cut -d: -f1`
#    echo SUBven=$SUBven
    if $LSPCI -s $x | grep CM8738 >/dev/null ; then
      CM8738=1
    fi
    SUB_NOT=`$LSPCI -s $x -v | grep Subsystem | grep nkown`
    echo "          Subsystem $SUBSYS" >> $TMPM 
    $LSPCI -s $x -v >> $TMPM
    if grep "$PCIDEV" $TMPM >/dev/null ; then
      cat<<END>> $TMPM
-------------------------------------------------------
 $PCIDEV  PCI bus PCI_ID with vendor component: $Vendor
 $SUBSYS  and Subsystem PCI_ID with vendor:     $SUBven
-------------------------------------------------------
 are key Sought Descriptions of your modem firmware.
 Have them ready when visiting URLs with service software!!
 For soft modems in AC'97 controller slots, the bus PCI_ID describes the Controller
 and the Subsystem PCI_ID the modem card inserted into it.  A soft modem chipset
 must be determined (guessed ?) to guide the choice of driver resources.

 It may be useful to download  http://www.yourvote.com/pci/vendors.txt
 and search it for vendor with and without caps, for example:  both  114d  and  114D
------------------------------------------------------------------------------------

END
      cat $TMPM >> $RECORD  
    fi 

    IRQ=`$LSPCI -s $x -vv | grep Interrupt | cut -d' ' -f7`
    if [ "$IRQ" = "0" ] ; then
      echo  "	`$LSPCI -s $x -vv | grep Interrupt`" >> $RECORD
cat<<END >> $RECORD
 The interrupt assignment:	 IRQ $IRQ         
 predicts that modem function will fail.
 Possible corrections are:
   1) to access the  the boot up BIOS change to a non-PNP mode.  
   Instructions for accessing BIOS are at:  
      http://linmodems.technion.ac.il/resources.html within:  Additional Resourcces.  
   2) Within some BIOS setups, IRQ assignments can be changed.
   3) On non-laptop systems moving the modem card to another slot has helped.
   4) Sometimes upgrading the kernel restores a non 0 IRQ .

END
    fi  

    ## Lucent/Agere/Xircom DSP modem section
    if [ "$Vendor"  = "11c1" ] || [ "$Vendor" = "115d" ] ; then
    DEVVEN=$(( 0x`echo $PCIDEV | cut -d':' -f1` + 0 ))
    DEVNUM=$(( 0x`echo $PCIDEV | cut -d':' -f2` + 0 ))
    for DEV in $DEVICES
    do
      VENDOR=$(( `echo $DEV | cut -d':' -f1` + 0 ))
      DEVMIN=$(( `echo $DEV | cut -d':' -f2 | cut -d'-' -f1` + 0 ))
      DEVMAX=$(( `echo $DEV | cut -d':' -f2 | cut -d'-' -f2` + 0 ))
      FOUND=
      if test $DEVVEN -eq $VENDOR && test $DEVNUM -ge $DEVMIN && test $DEVNUM -le $DEVMAX
      then
        FOUND="yes"
        PCI_ID="$PCIDEV" 
        MODEM_VENDOR=0x`echo $PCIDEV | cut -d':' -f1`
        MODEM_DEVICE=0x`echo $PCIDEV | cut -d':' -f2`
        if [ "$MODEM_VENDOR" = "0x11c1" ] ; then
          VENDED=LUCENT
        else
          VENDED=XIRCOM
        fi 
        if test -n "$PCI_ID" ; then
          DSP=1
          echo DSP=1 >> $RECORD
          cat <<END > $TMPM

 A supported Lucent/Agere DSP chipset modem is identified:  PCI_ID=$PCI_ID
    VENDOR $MODEM_VENDOR         DEVICE $MODEM_DEVICE
 ID are within the serviced ranges for Lucent/Agere DSP modems:
   ------------------------------------------
    LUCENT 0x11c1          0x0440-0x045c
    XIRCOM 0x115d          0x0000-0x000F
    XIRCOM 0x115d          0x0440-0x045c
    XIRCOM 0x115d          0x0010-0x03ff
  -------------------------------------------
 Drivers and their compiler kits are available at:
       http://www.heby.de/ltmodem/
  
END
        else
          cat <<END > $TMPM

 While ISA and PCMCIA card modems would not be detected,
 if the modem is a PCI type it will not be served by these
 drivers for Lucent/Agere digital signal processor modems.
  
END
          PCI_ID= 
        fi
        cat $TMPM
        cat $TMPM >> $RECORD
        echo For more details read the Recording file.
        echo
      fi
    done
    fi # end Lucent DSP section

    # for AMR modem section
    if grep -E $PCIDEV $TMPM.1 >/dev/null ; then
      grep -E $PCIDEV $TMPM.1 >>  $RECORD
      AMR=yes
    fi
    if test -n "$AMR" ; then
      echo >> $RECORD
cat <<END >> $RECORD.2

###########
AC_97 modem information
=======================
Comment from Ed Schulz of Agere Systems, Inc
--------------------------------------------
     AC '97 modems -- whether on the "AMR" connector, the "MDC" connector, 
 IBM's"CDC" connector, or on the Mini PCI slot -- are assigned a PCI ID by the
 system.  It's a mysterious process that involves the core logic chipset,
 the BIOS, and sometimes other subsystems.  For example, a Mini PCI Scorpio
 (Agere AC '97 modem) / WiFi combo can have one ID in one system, but
 another ID when plugged into a different system.  Update the BIOS, and the
 modem ID can change!!
    Another point: Agere does not manufacture modems, but we do just about
 everything but the actual board construction.  More recently, Agere might
 not even manufacture the ICs in the AC '97 modem.  Most of us will be
 getting chips from Silicon Labs.  But the ones we sell might be marked
 "Agere."  Confusing enough?
    So we deliver the soft modem driver that's known to work with a particular
 hardware implementation.  For a PC-OEM, we'll customize a modem.inf file
 that includes only those IDs that will appear in that brand of PC. 
 8086:2486 means Intel ICH3, regardless of whose PC and modem hardware is
 there.  The subsystem and subsystem vendor IDs should be unique to the PC
 vendor and specific modem hardware in there.
---------------------------------------------
     Thus sadly, the current ambiguities below: 
############

END
cat $TMPM.1 >> $RECORD
cat $TMPM.1 >> $RECORD.2
    fi # finish AMR modem section

# VendorS="11c1   125d 1057 11d4 10b7 12b9  127a 14f1 148d     134d   1813    1013  8086  115d
#   Vendor Lucent ESS  Motorola  3com USrob Conexnant/Rockwell PCTel Ambient Cirrus Intel Xircom

    # Following are Alternative information blocks for various modems
    # Vendor=11d4  # just for testing
    if [ "$PCIDEV" = "11c1:0462" ] ; then 
    cat <<END >> $RECORD  
 Lucent Wildwire ADSL Client with PCI_ID 11c1:0462 
 currently lacks support under Linux.
END
    fi 

#    echo Vendor=$Vendor
#    echo SUBVen=$SUBven
    VEND="$Vendor $SUBven"
    for v in $VEND
    # Cycle through Vendor and subVendor"
    do
    if test -z "$PRIMARY" ; then
      PRIMARY=1
      LEVEL=primary
    else 
      LEVEL=Subsystem
    fi 
    echo "	Checking $LEVEL Vendor=$v through major modem chipset Vendors" >> $RECORD 


    if [ "$v" = "125d" ] ; then
    cat <<END >> $RECORD 

 Vendor 10b9 is Acer Labs Inc.
            :5450  AC97 Agere Systems 
            :5457  AC97 Agere Systems 
 
END
    fi

    if [ "$v" = "125d" ] ; then
    cat <<END >> $RECORD 
 Vendor=$VEND corresponds to ESS Technologies
 providing no formal support for Linux since kernels 2.2.2
 But see some informal hacks at: http://andrew.cait.org/ess/
 http://sidlo.penguin.cz/ES2838/index_en.html 
 http://phep2.technion.ac.il/linmodems/archive/msg04424.html
END
    fi 

    if [ "$v" = "1057" ] || [ "$v" = "11d4" ] ; then
    cat <<END >> $RECORD
 Vendor=$v corresponds to Motorola 
 There was support for Linux the 2.4.5 kernels, but not subsequently.
 More details at    http://linmodems.technion.ac.il/Motorola.html  
 http://www.sm56linux.hpg.com.br
 http://phep2.technion.ac.il/linmodems/archive/msg02408.html
END
    fi 
    if [ "$v" = "10b7" ] || [ "$v" = "12b9" ] ; then
    cat <<END >> $RECORD

   10b7 is 3COM       
       :1006    0038TA <- AC101 - TF Mini-PCI 56K V.90
       :1007    3C556 V.90 Mini-PCI 
   12b9 is US Robotics. acquired by 3COM
       :0062    erk41926a-0.6 usr 56k internal modem
       ;1006    3cp803598  Voice          WinModem  no Linux support
       :1007    ERL3263A-0 DF GWPCI PC99  WinModem  no Linux support
       :1008    3cp803598  is Supported by the standard:  serial.o   



 
END
    fi 

    if [ "$v" = "134d" ] || [ -n "$CM8738" ] ; then
    cat <<END >> $RECORD
 Vendor=$v is PCTEL. 
 check for support at:  http://pctelcompdb.sourceforge.net/ and read the
 PCTel minHOWTO:  http://www.peacefulaction.org/sayamindu/docs.php
 CM8738 modem chipsets may be supported by PCTel drivers

END
    # 13f6:0211
    fi
    if [ "$PCIDEV" = "134d:7897" ] ; then 
    cat <<END >> $RECORD
 For a case of a  VIA686 motherboard PCTEL drivers compiled with
     hal=via686 
  did NOT provide effective drivers while the drivers were effective when compiled with
     hal=pct789 .
END
    fi
    if [ "$v" = "127a" ] ||  [ "$v" = "14f1" ] ||  [ "$v" = "148d" ]  ; then
    cat <<END >> $RECORD

 Vendors 127a and 14f1 are Conexnant, successor to Vendor=148d Rockwell technology.
 Check for support at:    http://www.mbsi.ca/cnxtlindrv/links.html

END
    fi
    if  [ "$v" = "1813" ] || [ "$v" = "8086" ] ; then
    cat<<END >> $RECORD

 8086 is Intel, Inc. which acquired
 1813 Ambient Tech. with its HaM (Host assisted Modems) chipsets.
 Linux drivers are at: http://developer.intel.com/design/modems/support/drivers_linux.htm
 and new releases may first be available at:  http://linmodems.technion.ac.il/resources.html
   within the section:     Modems based on Intel chips (HaM/536ep)
 There is support with one Exception, the 1813:4100 modems.  See message:
     http://linmodems.org/cgi-bin/ezmlm-cgi?1:mss:9448:200210:fbhcoigfcimgkjdedjad 
     
END
    fi
    if  [ "$v" = "1013" ] ; then
    cat<<END >> $RECORD

 There is NO SUPPORT the Vendor=1013 chipsets of CML, Cirrus Logic Modems.
 See message: http://linmodems.org/cgi-bin/ezmlm-cgi?1:mss:9448:200210:fbhcoigfcimgkjdedjad 

END
    fi

    if [ "$v" = "11c1" ] ; then
    cat <<END >> $RECORD

 Vendor=$v corresponds to Lucent Technologies or subsidiary Agere Systems, Inc.
 Information is at:  http://www.agere.com/support/client/modem_drivers.html
   but without any relevant to Linux.

END
    fi

    if [ "$v" = "115d" ] || [ "$PCIDEV" = "11c1:0420" ]  ; then
    cat <<END >> $RECORD

 Vendor=$v corresponds to Xircom, now an Intel subsidiary. 
   http://www.intel.com/support/peripherals/xc/modems/index.htm 
 These                     Device ID Range
                           -------------
    XIRCOM 0x115d          0x0000-0x000F
    XIRCOM 0x115d          0x0440-0x045c
    XIRCOM 0x115d          0x0010-0x03ff
   --------------------------------------
 are supported by the resources at http://www.heby.de/ltmodem

 Some other Xircom modems and Lucent 11c1:0420 modems
    MAY BE accessed by Insertion Options
 Download from http://www.heby.de/ltmodem  the:   ltmodem-"$LT_VERSION".tar.gz
 Open with:    tar zxvf  ltmodem-"$LT_VERSION".tar.gz
 Within the DOCs/ folder read the Insertion-param files
 and for fun, the history:   andreas.txt

 To get a recommendation for an Installer kit, run
    $BN  kit

END
    fi 
    done # with Vendor and SUBven

    echo  >> $RECORD 
  done
fi  #  TESTS
  
# DSP=011c:0442 
if test -n "$DSP" || [ "$1" = "kit" ] ; then
# Setting up board.info for grepping MODEL_DATA
  cat <<END > $TMPM.2
################
 0x0440 -- Mars 2 - data/fax/voice 
 0x0441 -- Mars 2 - data/fax only 
 0x0442 -- Mars 2 - data/fax/tam only 
 0x0448 -- Mars 2 Global Board - data/fax/voice 
 0x0449 -- Mars 2 Global Board - data/fax only 
 0x044A -- Mars 2 Global Board - data/fax/tam only 
 0x0444 -- Apollo 2 data/fax only : Modem/LAN combo board Apollo behind an Intel 82559 
 0x0445 -- Apollo 2 Global Board data/fax only : Modem/LAN combo board Apollo behind an Intel 82559 
 0x0446 -- Apollo 2 data/fax/voice : Modem/LAN combo board Apollo behind an Intel 82559 
 0x0447 -- Apollo 2 Global Board data/fax/voice : Modem/LAN combo board Apollo behind an Intel 82559 
 0x044C -- Mars 3 Perseus data/fax only:North America and Global board 
 0x044E -- Mars 3 Mercury data fax only 
 0x0450 -- Mars 3 Mercury data fax Global board 
 0x0451 -- Mars 3 Mercury data/fax/voice 
 0x0452 -- Mars 3 Mercury data/fax/voice Global board 
 0x0455 -- Mars 3 Perseus data/fax/voice: North America and Global board 
 0x0458 -- Mars 3 Mercury data/fax/tam only. 
 0x0459 -- Mars 3 Mercury data/fax/tam only. Global board. 
 0x045A -- Mars 3 Perseus data/fax/tam only.: North America and Global board 
 0x045B -- Apollo 3 Perseus data/fax only : Modem/LAN combo board Apollo behind an Intel 82559 
 0x045C -- Apollo 3 Mercury data/fax only : Modem/LAN combo board Apollo behind an Intel 82559 
 0x045D -- Mars 3 Mercury data/fax/tam only. Global board for Cardbus modem product. 
 0x044C -- Mars 3.2 Mercury data fax only when no eeprom is present: North America DAA 
##############
END

# MODEM_Device=0442    # for testing
  if grep $MODEM_DEVICE $TMPM.2 > /dev/null ; then
    grep $MODEM_DEVICE $TMPM.2   >> $RECORD
  fi

  if [ "$DSP" = "11c1:0442" ] ; then  
    echo "The $DSP modems have an electro-optical coupling" >> $RECORD
    echo "which in some hardware is Not adequately supported by these drivers." >> $RECORD
    echo   >> $RECORD
  fi
  if [ "$VENDED" = "LUCENT" ] ; then
    echo " Get Lucent/Agere information at:"   >> $RECORD 
    echo "	http://www.agere.com/support/client/modem_drivers.html"  >> $RECORD
  else 
    echo "	http://appsr.intel.com/scripts-df/support_intel2.asp"  >> $RECORD
    echo XIRCOM is now owned by Intel  >> $RECORD
    echo "	http://support.intel.com/"  >> $RECORD
    echo  >> $RECORD
    echo ================================ >> $RECORD
    echo  >> $RECORD
  fi 

  if [ "$DISTR" != "Not_identified" ] ; then 
    # No use if the distribution is not known
    if [ "$DISTR" = "slackware" ] ; then
      echo Installers are not available for Slackware Linux  >> $RECORD
    fi
    # DISTR=redhat
    # pick out the Distro section
##### Listing from http://www.heby.de/ltmodem begins 
    cat <<END > /dev/null
 ./conectiva:
END 
    L=ltmodem
    if [ "$DISTR" = "conectiva" ] ; then
      cat<<END > $TMPM
ltmodem-6.00b7.i386.rpm
ltmodem-kv_2.2.19_15cl-6.00b15-1.i386.rpm
ltmodem-kv_2.2.19_25U70_3cl-6.00c2-1.i386.rpm
ltmodem-kv_2.4.12_4U70_2cl-6.00c2-1.i386.rpm
ltmodem-kv_2.4.18_3U8_4cl-8.22a4-1.i386.rpm

./conectiva/8.22a5:
ltmodem-kv_2.4.19_1U80_2cl-8.22a5-1.i386.rpm
END
    fi 
    if [ "$DISTR" = "debian" ] ; then
      cat<<END > $TMPM
ltmodem-2.2.20-compact_6.00c2_i386.deb
ltmodem-2.2.20-idepci_6.00c2_i386.deb
ltmodem-2.2.20-reiserfs_6.00c2_i386.deb
ltmodem-2.2.20_6.00c2_i386.deb
ltmodem-2.2.21-compact_6.00c2_i386.deb
ltmodem-2.2.21-idepci_6.00c2_i386.deb

ltmodem-2.4.0-test11_8.00a3_i386.deb
ltmodem-2.4.10-386_8.00a3_i386.deb
ltmodem-2.4.10-586_8.00a3_i386.deb
ltmodem-2.4.10-586tsc_8.00a3_i386.deb
ltmodem-2.4.10-686-smp_8.00a3_i386.deb
ltmodem-2.4.10-686_8.00a3_i386.deb
ltmodem-2.4.10-k6_8.00a3_i386.deb
ltmodem-2.4.10_8.00a3_i386.deb
ltmodem-2.4.12-386_8.00a3_i386.deb
ltmodem-2.4.12-586_8.00a3_i386.deb
ltmodem-2.4.12-586tsc_8.00a3_i386.deb
ltmodem-2.4.12-686-smp_8.00a3_i386.deb
ltmodem-2.4.12-686_8.00a3_i386.deb
ltmodem-2.4.12-k6_8.00a3_i386.deb
ltmodem-2.4.12_8.00a3_i386.deb
ltmodem-2.4.13-386_8.00a3_i386.deb
ltmodem-2.4.13-586-ext3_8.00a3_i386.deb
ltmodem-2.4.13-586_8.00a3_i386.deb
ltmodem-2.4.13-586tsc_8.00a3_i386.deb
ltmodem-2.4.13-686-smp_8.00a3_i386.deb
ltmodem-2.4.13-686_8.00a3_i386.deb
ltmodem-2.4.13-k6_8.00a3_i386.deb
ltmodem-2.4.13_8.00a3_i386.deb
ltmodem-2.4.14-386_8.00a3_i386.deb
ltmodem-2.4.14-586-ext3_8.00a3_i386.deb
ltmodem-2.4.14-586_8.00a3_i386.deb
ltmodem-2.4.14-586tsc_8.00a3_i386.deb
ltmodem-2.4.14-686-smp_8.00a3_i386.deb
ltmodem-2.4.14-686_8.00a3_i386.deb
ltmodem-2.4.14-k6_8.00a3_i386.deb
ltmodem-2.4.14-k7_8.00a3_i386.deb
ltmodem-2.4.14_8.00a3_i386.deb
ltmodem-2.4.16-386_8.00a3_i386.deb
ltmodem-2.4.16-586_8.00a3_i386.deb
ltmodem-2.4.16-586tsc_8.00a3_i386.deb
ltmodem-2.4.16-686-smp_8.00a3_i386.deb
ltmodem-2.4.16-686_8.00a3_i386.deb
ltmodem-2.4.16-k6_8.00a3_i386.deb
ltmodem-2.4.16-k7_8.00a3_i386.deb
ltmodem-2.4.16_8.00a3_i386.deb
ltmodem-2.4.17-386_8.00a3_i386.deb
ltmodem-2.4.17-586tsc_8.00a3_i386.deb
ltmodem-2.4.17-686-smp_8.00a3_i386.deb
ltmodem-2.4.17-686_8.00a3_i386.deb
ltmodem-2.4.17-bf2.4_8.00a3_i386.deb
ltmodem-2.4.17-k6_8.00a3_i386.deb
ltmodem-2.4.17-k7_8.00a3_i386.deb
ltmodem-2.4.17_8.00a3_i386.deb
ltmodem-2.4.18-386_8.00a3_i386.deb
ltmodem-2.4.18-586tsc_8.00a3_i386.deb
ltmodem-2.4.18-686-smp_8.00a3_i386.deb
ltmodem-2.4.18-686_8.00a3_i386.deb
ltmodem-2.4.18-bf2.4_8.00a3_i386.deb
ltmodem-2.4.18-k6_8.00a3_i386.deb
ltmodem-2.4.18-k7_8.00a3_i386.deb
ltmodem-2.4.18_8.00a3_i386.deb
ltmodem-2.4.4-386_8.00a3_i386.deb
ltmodem-2.4.4-586_8.00a3_i386.deb
ltmodem-2.4.4-586tsc_8.00a3_i386.deb
ltmodem-2.4.4-686-smp_8.00a3_i386.deb
ltmodem-2.4.4-686_8.00a3_i386.deb
ltmodem-2.4.4-k6_8.00a3_i386.deb
ltmodem-2.4.4-k7_8.00a3_i386.deb
ltmodem-2.4.4_8.00a3_i386.deb
ltmodem-2.4.5-386_8.00a3_i386.deb
ltmodem-2.4.5-586_8.00a3_i386.deb
ltmodem-2.4.5-586tsc_8.00a3_i386.deb
ltmodem-2.4.5-686-smp_8.00a3_i386.deb
ltmodem-2.4.5-686_8.00a3_i386.deb
ltmodem-2.4.5-k6_8.00a3_i386.deb
ltmodem-2.4.5_8.00a3_i386.deb
ltmodem-2.4.7-386_8.00a3_i386.deb
ltmodem-2.4.7-586_8.00a3_i386.deb
ltmodem-2.4.7-586tsc_8.00a3_i386.deb
ltmodem-2.4.7-686-smp_8.00a3_i386.deb
ltmodem-2.4.7-686_8.00a3_i386.deb
ltmodem-2.4.7-k6_8.00a3_i386.deb
ltmodem-2.4.7_8.00a3_i386.deb
ltmodem-2.4.9-386_8.00a3_i386.deb
ltmodem-2.4.9-586_8.00a3_i386.deb
ltmodem-2.4.9-586tsc_8.00a3_i386.deb
ltmodem-2.4.9-686-smp_8.00a3_i386.deb
ltmodem-2.4.9-686_8.00a3_i386.deb
ltmodem-2.4.9-k6_8.00a3_i386.deb
ltmodem-2.4.9_8.00a3_i386.deb
END
    fi 
    if [ "$DISTR" = "mandrake" ] ; then
      cat<<END > $TMPM
./mandrake:

ltmodem-kv_2.4.3_20mdk-6.00a1-1.i686.rpm
ltmodem-kv_2.4.7_13mdk-6.00a1-1.i586.rpm

ltmodem-kv_2.2.17_21mdk-6.00b4-1.i686.rpm
ltmodem-kv_2.2.19_4.1mdk-6.00b4-1.i686.rpm

ltmodem-kv_2.2.19_20.1mdk-6.00b7-1.i586.rpm
ltmodem-kv_2.2.19_20.1mdk-6.00b7-1.i686.rpm
ltmodem-kv_2.4.8_26mdk-6.00b7-1.i586.rpm
ltmodem-kv_2.4.8_26mdk-6.00b7-1.i686.rpm

ltmodem-kv_2.2.19_6.3mdk-6.00b15-1.i586.rpm
ltmodem-kv_2.2.19_6.3mdk-6.00b15-1.i686.rpm
ltmodem-kv_2.4.3_20mdk-6.00b15-1.i586.rpm
ltmodem-kv_2.4.8_34.1mdk-6.00b15-1.i586.rpm
ltmodem-kv_2.4.8_34.1mdk-6.00b15-1.i686.rpm

ltmodem-kv_2.2.20_9.1mdk-6.00c2-1.i586.rpm
ltmodem-kv_2.2.20_9mdk-6.00c2-1.i586.rpm
ltmodem-kv_2.2.20_9mdk-6.00c2-1.i686.rpm

ltmodem-kv_2.4.18_6mdksmp-8.22a4-1.486.rpm

./mandrake/8.22a5:
ltmodem-kv_2.4.18_6mdk-8.22a5-1.i586.rpm
ltmodem-kv_2.4.18_6mdk-8.22a5-1.i686.rpm
ltmodem-kv_2.4.18_6mdksmp-8.22a5-1.i586.rpm
ltmodem-kv_2.4.18_6mdksmp-8.22a5-1.i686.rpm
ltmodem-kv_2.4.18_8.1mdk-8.22a5-1.i586.rpm
ltmodem-kv_2.4.18_8.1mdk-8.22a5-1.i686.rpm
ltmodem-kv_2.4.18_8.1mdksmp-8.22a5-1.i586.rpm
ltmodem-kv_2.4.18_8.1mdksmp-8.22a5-1.i686.rpm
ltmodem-kv_2.4.19_16mdk-8.22a5-1.i586.rpm
END
    fi 
    if [ "$DISTR" = "redhat" ] ; then
      echo redhat
      cat<<END > $TMPM
./redhat:
ltmodem-kv_2.2.16_22-6.00a1-1.i386.rpm
ltmodem-kv_2.2.19_7.0.8-6.00a1-1.i386.rpm
ltmodem-kv_2.4.3_12-6.00a1-1.i386.rpm
ltmodem-kv_2.4.3_SGI_XFS_1.0.1-6.00a1-1.i386.rpm
ltmodem-kv_2.4.6_2.4-6.00a1-1.i386.rpm
ltmodem-kv_2.4.7-6.00a1-1.i386.rpm

ltmodem-kv_2.4.12_0.1-6.00b4-1.i386.rpm
ltmodem-kv_2.4.9_0.5-6.00b4-1.i386.rpm
ltmodem-kv_2.4.9_6-6.00b4-1.i386.rpm
ltmodem-kv_2.4.9_7-6.00b4-1.i386.rpm

ltmodem-kv_2.4.9_12-6.00b7-1.i386.rpm
ltmodem-kv_2.4.9_13-6.00b7-1.i386.rpm

ltmodem-kv_2.4.9_31-6.00b14-1.athlon.rpm
ltmodem-kv_2.4.9_31-6.00b14-1.i686.rpm

ltmodem-kv_2.4.17_0.13-6.00b15-1.athlon.rpm
ltmodem-kv_2.4.17_0.13-6.00b15-1.i386.rpm
ltmodem-kv_2.4.17_0.13-6.00b15-1.i586.rpm
ltmodem-kv_2.4.17_0.13-6.00b15-1.i686.rpm
ltmodem-kv_2.4.7_10-6.00b15-1.athlon.rpm
ltmodem-kv_2.4.7_10-6.00b15-1.i386.rpm
ltmodem-kv_2.4.7_10-6.00b15-1.i586.rpm
ltmodem-kv_2.4.7_10-6.00b15-1.i686.rpm
ltmodem-kv_2.4.9_21-6.00b15-1.athlon.rpm
ltmodem-kv_2.4.9_21-6.00b15-1.i386.rpm
ltmodem-kv_2.4.9_21-6.00b15-1.i586.rpm
ltmodem-kv_2.4.9_21-6.00b15-1.i686.rpm

ltmodem-kv_2.4.9_31-6.00c2-1.i386.rpm

ltmodem-kv_2.4.18_0.13-8.22a3-1.i386.rpm
ltmodem-kv_2.4.18_3-8.22a3-1.athlon.rpm
ltmodem-kv_2.4.18_3-8.22a3-1.i586.rpm
ltmodem-kv_2.4.18_3-8.22a3-1.i686.rpm
ltmodem-kv_2.4.2_2-8.22a3-1.i386.rpm

ltmodem-kv_2.4.18_10-8.22a5-1.athlon.rpm
ltmodem-kv_2.4.18_10-8.22a5-1.i386.rpm
ltmodem-kv_2.4.18_10-8.22a5-1.i486.rpm
ltmodem-kv_2.4.18_10-8.22a5-1.i586.rpm
ltmodem-kv_2.4.18_10-8.22a5-1.i686.rpm
ltmodem-kv_2.4.18_17.7.x-8.22a5-1.athlon.rpm
ltmodem-kv_2.4.18_17.7.x-8.22a5-1.duron.rpm
ltmodem-kv_2.4.18_17.7.x-8.22a5-1.i386.rpm
ltmodem-kv_2.4.18_17.7.x-8.22a5-1.i486.rpm
ltmodem-kv_2.4.18_17.7.x-8.22a5-1.i586.rpm
ltmodem-kv_2.4.18_17.7.x-8.22a5-1.i686.rpm
ltmodem-kv_2.4.18_17.8.0-8.22a5-1.athlon.rpm
ltmodem-kv_2.4.18_3-8.22a5-1.i386.rpm
ltmodem-kv_2.4.18_5-8.22a5-1.athlon.rpm
ltmodem-kv_2.4.18_5-8.22a5-1.i386.rpm
ltmodem-kv_2.4.18_5-8.22a5-1.i486.rpm
ltmodem-kv_2.4.18_5-8.22a5-1.i586.rpm
ltmodem-kv_2.4.18_5-8.22a5-1.i686.rpm
ltmodem-kv_2.4.9_34-8.22a5-1.i386.rpm
END
    fi 
    if [ "$DISTR" = "SuSE" ] ; then
      cat<<END > $TMPM
ltmodem-kv_2.4.10_4GB-6.00b4-1.i386.rpm
ltmodem-kv_2.4.16_4GB-6.00b9-1.i386.rpm

ltmodem-kv_2.4.18_4GB-8.22a3-1.i386.rpm

ltmodem-kv_2.4.19_4GB-8.22a5-1.i386.rpm

################### Listing from http://www.heby.de/ltmodem ends 
END
    fi # SuSE, Done choosing DISTR block

    # for testing 
    # PVER=2.4.18_5
    # CPU=i786

    echo >> $RECORD
    echo "  The desired installer name is like:" >> $RECORD
    echo "========================================"  >> $RECORD 
    # echo Checking for suitable ltmodem Installers
    if [ "$DISTR" = "debian" ] ; then
      echo ltmodem-"$FILTER""$LT_VERSION"_i386.deb >> $RECORD
      # FILTER=2.4.18-6_
      if grep $FILTER $TMPM > /dev/null ; then
        grep $FILTER $TMPM > $TMPM.1
        BEST=$TMPM.1
      fi
    else
      # conectiva mandrake redhat SuSE,  all  .rpm
      if [ "$DISTR" = "mandrake" ] ||[ "$DISTR" = "redhat" ] ; then
        echo ltmodem-kv-$PVER-$LT_VERSION-1.$CPU.rpm >> $RECORD
      fi
      if [ "$DISTR" = "conectiva" ] ||[ "$DISTR" = "SuSE" ] ; then
        echo "ltmodem-kv-$PVER-$LT_VERSION-i386.rpm" >> $RECORD
      fi
      grep $PVER $TMPM  > $TMPM.2 
      grep $CPU $TMPM.2 >  $TMPM.1
      if grep "ltmodem-" $TMPM.1 >/dev/null ; then
        BEST=$TMPM.1
      elif grep "ltmodem-" $TMPM.2 >/dev/null ; then 
        BEST=$TMPM.2
      else
        BEST=
      fi     
    fi 
    cat << END >> $RECORD
---------------------------------------- 
ltmodem-kv-Kernel_FL-LTver--.CPU.rpm   explains the versioning.
 LTver $LT_VERSION  is the release of the resource 
 used in compiling and assembling driver packages.
 `echo $LT_VERSION | cut -da -f1` is the Agere core code designation.

END

    # Results
    if [ "$BEST" = "$TMPM.1" ] ; then
        cat << END > $TMPM.3
 A suitable Installer is at http://www.heby.de/ltmodem
 in the section:	$DISTR 
 ------------------------------------------------------   
 `cat $BEST` 
    cat $TMPM.3 >>  $RECORD
    cat $TMPM.3 
END
    elif [ "$BEST" = "$TMPM.2" ] ; then
        cat << END > $TMPM.3
 Installers that may suffice are at http://www.heby.de/ltmodem 
 in the section:	$DISTR 
------------------------------------------------------   
 `cat $BEST` 
------------------------------------------------------ 
 The closest match to your   $CPU=CPU   is recommended.
 For example replacements in order of preference for an
    i686 would be i586, i486 and i386
 The Kernel_FLavor section MUST match.
 If not the ltmodem-$LT_VERSION.tar.gz compiler MUST BE USED.

END
    cat $TMPM.3 >>  $RECORD
    cat $TMPM.3 
    else
      cat<<END >> $RECORD
 A suitable installer is not available as of this $UPDATE update.
 Check in the section $DISTR at  http://www.heby.de/ltmodem
 for a subsequent Installer submission.
 If not present use the ltmodem-$LT_VERSION.tar.gz compiler kit.

 The list of available Installers for $DISTR
 is inserted into to $RECORD.2
END
    echo -----------Installer list for $DISTR --------  >>  $RECORD.2
    cat $TMPM >> $RECORD.2
    echo ------- end Installer List -----------------  >>  $RECORD.2
    fi

  fi # DISTR not recognized
  if grep smp $TMPM >/dev/null ; then
###########
cat<<END >> $RECORD.2

   Symmetric Multi Processors (SMP) issues
----------------------------------------------------------------------------------
  Beginning with the Agere version 8.00 core code, the ltmodem drivers are 
  functional on Systems with SMP kernels such as your kernel-$SYS ,
  so far as supporting dialout and initiation of ppp. 
  However these dialout sessions  inevitable stall, 
  evidently because of inadequate interrupt handling by the core ltmodem code.  
  This problem can be bypassed with some loss of performance by
  using the bootup option: NOAPCI

END
############
fi # DSP

# echo Scanning for a PCI bridge to a CardBus with:  "lspci | grep CardBus"
echo ---------------------------------------- > $TMPM
CARDBUS=`lspci | grep -E CardBus | cut -d' ' -f1`
if test -z "$CARDBUS" ; then
  CARDBUS=`lspci | grep Cardbus | cut -d' ' -f1`
fi
if test -z "$CARDBUS" ; then
 echo A PCI CardBus is not detected on this System. >> $TMPM
else
    port=0
    for i in $CARDBUS ; do
        echo Analyzing information for PCMCIA device at PCI Bus $i >> $TMPM
        lspci -s $i -v >> $TMPM
        echo "GREPping for an inserted PCMCIA modem with filter:        ommunication"  >> $TMPM
        MODEM=`lspci  -v | grep Communication`
        if test -n "$MODEM" ; then
            port=1
        fi
    done
    if test $port -gt 0 ; then
       cat<<END>>$TMPM

  A PCMCIA modem is detected.  >> $TMPM
     `lspci -s $i -v | grep ommunication`
 The stardard ltmodem resources should suffice for modem support:
     http://www.heby.de/ltmodem/ 
 if the modem has a Lucent/Agere digital processing chipset. 
END
    else
       cat<<END>>$TMPM
 If a PCMCIA modem is currently inserted and the sockets activated by
    /etc/init.d/pcmcia start
 then the PCMCIA bridge is NOT transparent.

 If the modem is known to have a Lucent digital signal processing chipset,
 then PCMCIA.tar.gz variant assembled by Joern Wustenfeld is necessary,
 rather than the standard ltmodem-$LT_VERSION.tar.gz at  http://www.heby.de/ltmodem/
END
     fi
     cat $TMPM >> $RECORD.2
     echo 
fi

# gcc problem
GCC=`gcc -dumpversion`
# echo GCC=$GCC
GCCmajor=`echo $GCC  | cut -d. -f1`
# GCCmajor=3
# echo GCCmajor=$GCCmajor
if [ "$GCCmajor" = "3" ] ; then
  echo GCCversion=$GCC >> $RECORD
#########
  cat << END >> $RECORD.2
 			
 ---------------------------------------------------------------------------------------------
 The proprietary Binary component of the current winmodem drivers were compiled with
 version 2.9n gcc compiler.  Red Hat 8.0 and Mandrake 9.0 releases utilize 
 version 3.nn gcc compilers.  This currently is causing difficulties either 
 in compiling and/or insertion of updated winmodem drivers.

 The gcc compiler version of this System is:   $GCC
 It will likely be necessary to force (-f) insertion of winmodem drivers, with credit to
 Jos Vos: http://phep2.technion.ac.il/linmodems/archive/msg04510.html
 
 For the ltmodem drivers with proprietary binary provided by Agere Systems,
 compiling with versions gcc=3.nn is successful.
 A minor edit required to compile PCTEL drivers has also been reported:
     http://phep2.technion.ac.il/linmodems/archive/msg04684.html

  Simple driver insertion fails in these cases with a message like: 
----begin error----
% insmod lt_modem
Using /lib/modules/2.4.18-14/ltmodem/lt_modem.o
/lib/modules/2.4.18-14/ltmodem/lt_modem.o: The module you are trying to
load (/lib/modules/2.4.18-14/ltmodem/lt_modem.o) is compiled with a gcc
version 2 compiler, while the kernel you are running is compiled with
a gcc version 3 compiler. This is known to not work.
-----end error-----

 It is necessary as Root to force (-f) loading with commands like:
     insmod -f lt_modem
     insmod -f lt_serial
     
 respectcing the dependency ordering of the drivers.
 Then check for insertion with:
    lsmod

 If driver insertion is successful, the forcing can be automated
 by putting the lines (credit to Bhaskaran Raman)  like the following,
    install lt_modem  /sbin/insmod --force lt_modem
    install lt_serial /sbin/insmod --force lt_serial

 In order of preference depending on your particular Linux installation.
 Put these lines into ONLY ONE of the following files,
 within any modem loading subsection if present: 
    /etc/modutils/ltmodem
    /etc/modutils/aliases
    /etc/modules.conf

 Then inform your System of the edit for Debian like Systems with
    update-modules
 which rewrites and reads /etc/modules.conf . For other System types 
    depmod -a
 re-reads the edited      /etc/modules.conf .

 Thereafter module loading should behave as previously.
 For the ltmodem drivers loading,
 it should suffice to either start a ppp session or
    modprobe lt_serial
      
END
###############
fi

# A general Advisory
ETHER=`$LSPCI | grep Ether | cut -d' ' -f1`
if test -n "$ETHER" ; then
cat <<END >> $RECORD.2

  -----------------------------------------------------
  The System has Ethernet capability. If not expert, 
  shut down ethernet before initiated modem usage with:
  # ifconfig eth0 down

END
  $LSPCI -s $ETHER -v >> $RECORD.2
  echo >> $RECORD.2
fi
############

echo >> $RECORD
echo  The following information blocks just query some ppp support items. >> $RECORD
echo "===================================================================="  >> $RECORD
echo  "   grep ppp /etc/modules.conf" >> $RECORD
echo -------------------------------- >> $RECORD
grep ppp /etc/modules.conf >> $RECORD
echo -------------------------------- >> $RECORD

if test -e /dev/ppp ; then
  DEVPPP=`ls -l /dev/ppp`
fi
echo DEVPPP=$DEVPPP  >> $RECORD

if test -e /dev/.devfsd ; then
  DEVFS=active
fi
echo DEVFS=$DEVFS >> $RECORD

DEVFSD=`locate devfsd.conf | grep etc`
echo DEVFSD=$DEVFSD  >> $RECORD
if test -n "$DEVFSD" ; then
   echo DEVFSD_PPP=`grep PPP $DEVFSD` >> $RECORD
fi 
echo >> $RECORD

cat <<END >> $RECORD.2
 --------------------------------------------------------
 Some useful URLs for related information follow: 
 for general upto date advice:   
    http://linmodems.technion.ac.il/ 
    http://linmodems.technion.ac.il/resources.html 
 for a general PCI_ID database
    http://www.yourvote.com/pci/ 
    The Vendor listing is  http://www.yourvote.com/pci/vendors.txt 
      with some Device IDs too.
 the original Linux winmodems URL is: 
    http://linmodems.org 
 with a mailing list on Winmodems: 
    discuss@linmodems.org 
 whose archives can be searched at: 
    http://linmodems.technion.ac.il/wgindex.html 
 There is an extensive modem database at: 
    http://www.idir.net/~gromitkc/winmodem.html 
 USB modem information:  http://www.linux-usb.org/USB-guide/x332.html 
    www.idir.net/~gromitkc/usblist.html 


END
if [ "$BN" = "scanModem" ] ; then
  if [ "`pwd`" != "/" ] ; then
    cp "$RECORD"* ./
    echo Please read: `ls ModemData.txt*`
  else
    echo  "	Please read $RECORD and $RECORD.2"
  fi

  if test -z $FAST ; then
    rm -r /tmp/ltmodem/ &> /dev/null
  fi
else 
  echo  -------------- ending SCANMODEM section ---------------- >> $RECORD
fi
echo

