Auto invoke browser upon wvdial successful Internet connection
Bob Shaffer
fedora at bobshafferscomputer.com
Sat May 1 12:32:16 UTC 2004
This will do what you want.
#!/bin/bash
nohup wvdial 1>/dev/null 2>/dev/null &
while true; do
if [ -n "`/sbin/pidof pppd`" ]; then
# successfully connected
mozilla &
exit
fi
if [ -z "`/sbin/pidof wvdial`" ]; then
# wvdial failed and exited
xmessage "Failed to connect."
exit
fi
sleep 1
done
# end of script
It doesn't represent my life's work or anything, but it will work.
You can just run "killall -2 wvdial" to close the connection.
You can actually set up pppd to dial for you, and dial on demand if you
want too. That way when you open a browser it will automatically dial for
you if you're offline.
____________________________________________________________________________
Bob Shaffer II - Owner, Developer, System Operator - BobShaffersComputer.com
http://bobshafferscomputer.com/
/"\
\ / ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
X CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
/ \
Barry Yu said:
> I want to activate the Mozilla browsing ONLY WHEN INTERNET CONNECTION
> IS SUCCESSFULLY ESTABLISHED by WVDIAL, could any one advice or point me
> to right place of a how-to, I am not good at script (yet), if there is
> one, would really appreciate, Thanks.
>
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
>
More information about the fedora-list
mailing list