wvdialshell 986 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. if [ ! -e /etc/wvdial.conf ];then
  3. #echo "Running wvdialconfig..."
  4. xmessage -center -bg orange -title "Wvdial" -buttons "" "Wait, detecting modem..." &
  5. wvdialconf /etc/wvdial.conf
  6. RETVAL=$?
  7. killall xmessage
  8. if [ $RETVAL -eq 0 ];then
  9. gtk-shell --title "Wvdial: Edit file, click Save button to continue" --edit-file "/etc/wvdial.conf"
  10. else
  11. #modem not detected.
  12. xmessage -center -bg red -title "Wvdial: error" "Modem not detected. Press OK button to quit..."
  13. exit
  14. fi
  15. fi
  16. #xmessage -center -bg red -title "Wvdial" "Now dialing..."
  17. #/etc/ppp/peers/wvdial clashes with Gkdial, so keep wvdial
  18. #in /etc/ppp/ until needed.
  19. cp -f /etc/ppp/wvdial /etc/ppp/peers/
  20. [ -f /etc/ppp/wvdial-pipe ] && cp -f /etc/ppp/wvdial-pipe /etc/ppp/peers/ #for wvdial 1.5x
  21. rxvt -geometry 80x5 -bg green -title "wvdial: close window to disconnect" -e wvdial
  22. rm -f /etc/ppp/peers/wvdial
  23. [ -f /etc/ppp/peers/wvdial-pipe ] && rm -f /etc/ppp/peers/wvdial-pipe
  24. killall wvdial
  25. killall pppd