#!/bin/sh
#
# Virtmodem does the same thing as the similar program 'modemu'.
# It will allow you to use zmodem etc. over a telnet connection using
# a serial modem program like minicom etc.
#
# In the case below 'minicom' will be used.
#
# virtmodem
#
# Type the site you want to connect to in the minicom terminal window,
# then press enter.
#
# atdfoo.boo.com      <-Examples, put atd before the site you want to 
# atd205.117.312.67     connect to.
#
# When you're done with the telnet connection you should quit minicom
# without reseting the modem.
#
# Press Ctrl-A Q or Alt Q  Leave without reset? = Yes
#
# Read README & README.linux for more info.
#
# Kent Robotti <robotti@erols.com> 2-4-98
#
if `ps xc | grep -q virtmodem` ; then
kill -9 `ps aux | grep virtmodem | grep -v "grep virtmodem" | awk '{print $2}'`
virtmodem >/dev/null 2>&1 && minicom -o -p ttyp0
else
virtmodem >/dev/null 2>&1 && minicom -o -p ttyp0
fi
