!#/bin/sh
# A little script to finish off wvdialconf so no manual editing is not required
clear
dialog --title "Add Username" --inputbox "Please enter the login \
username that you use for your ISP" 8 62 2> /tmp/username.tmp
user=`cat /tmp/username.tmp`
rm -f /tmp/username.tmp
dialog --clear --title "Add Password" --inputbox "please enter the password \
that you use to login to your ISP" 8 62 2> /tmp/passwd.tmp
pass=`cat /tmp/passwd.tmp`
rm -f /tmp/passwd.tmp
dialog --clear --title "Add Phone Number" --inputbox "Please enter the phone \
number to dial your ISP" 8 62 2> /tmp/pnumber.tmp
pnum=`cat /tmp/pnumber.tmp`
rm -f /tmp/pnumber.tmp
sed -e '/^;/d' /etc/wvdial.conf > /etc/wvdial.cfg
mv /etc/wvdial.cfg /etc/wvdial.conf
echo "Phone = $pnum" >> /etc/wvdial.conf 
echo "Username = $user" >> /etc/wvdial.conf
echo "Password = $pass" >> /etc/wvdial.conf
dialog --clear --title "All Done" --msgbox " Wvdial is all configured and \
ready to go. When you want to connect to your ISP just type 'wvdial' or \
click on the isp connect icon on your X desktop. Remember wvdial only works \
if you are 'root' so if trying to dial as a regular user use the 'su' command \
to give you 'root' access before using wvdial." 12 64
exit 0
exit 0