#!/bin/sh
#
#    eee-maxon-bp3 /usr/sbin/bp3-test gather system information for diagnosis
#    Copyright (C) 2008  James Cameron (quozl@laptop.org)
#
#    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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#

echo "bp3-test: environment check"
date
uname -a
echo ""

echo "bp3-test: check modem is present on USB"
if (lsusb | grep --silent 6280); then
    echo "bp3-test: modem is present"
else
    echo "bp3-test: modem is NOT PRESENT"
fi
echo ""

echo "bp3-test: check option module loaded"
if (lsmod | grep --silent "^option"); then
    echo "bp3-test: option module is loaded"
else
    echo "bp3-test: option module is NOT LOADED"
fi
echo ""

echo "bp3-test: list of /dev/tts/"
ls -l /dev/tts/
echo ""
