#! /bin/sh

# Used with survey script to display any PCMCIA Information.
# This file is part of survey - a program to Dump all system file info
# Copyright (C) 1994-99 Everett W. Holland, Jr.
#         <everett@roanoke.infi.net>
#
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of the GNU General Public License as 
#    published by the Free Software Foundation; either version 2 of the
#    License, or (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#

PATH=$PATH:/sbin
if [ -f /etc/stab ]
then
  echo ++++  /etc/stab:    ++++
  cat  /etc/stab
fi
if [ -f /var/run/stab ]
then
  echo ++++  /var/run/stab:    ++++
  cat  /var/run/stab
fi
if  `grep pcmcia /proc/devices >/dev/null` 
then
   echo ++++  loadable modules \( lsmod \)  ++++
   lsmod
   echo ++++  /sbin/cardctl status ++++ 2>&1
   cardctl status
   echo ++++  /sbin/cardctl config ++++ 2>&1
   cardctl config
   #  cardctl ident only lists the stab file
   #  echo ++++  /sbin/cardctl ident ++++
   #  cardctl ident
 if [ -d /etc/sysconfig ]
 then
  echo ++++  Networking setup - /etc/sysconfig/network ++++
  cat /etc/sysconfig/network
  echo ++++  Networking setup - /etc/sysconfig/pcmcia ++++
  cat  /etc/sysconfig/pcmcia
  if [ -f /etc/pcmcia/network.opts ]
  then
     echo ++++  Networking setup - /etc/pcmcia/network.opts ++++
     cat  /etc/pcmcia/network.opts
  fi
  echo ++++  PCMCIA setup - /etc/pcmcia/config.opts ++++
  cat  /etc/pcmcia/config.opts
 else
  if [ -f /etc/pcmcia/network.opts ]
  then
     echo ++++  Networking setup - /etc/pcmcia/network.opts ++++
     cat  /etc/pcmcia/network.opts
  fi
  echo ++++  PCMCIA setup - /etc/pcmcia/config.opts ++++
  cat  /etc/pcmcia/config.opts
 fi
else
   echo PCMCIA not installed, not in /proc/devices...
fi
