Thought this might be of interest to other SLUGers out there. If
anyone wants a copy or a diff or something let me know via private
email.

---------- Forwarded message ----------
Date: Thu, 16 Mar 2000 23:08:32 +1100 (EST)
From: Grant Parnell <[EMAIL PROTECTED]>
To: Brad Thomson
Cc: Yvonne Smith
Subject: Telling your PC to dial the net from remote

A while back you folks wanted a way to get your computer at home to
dial up the net when you tell it to via telephone. I've come up with
an excellent way to do this by modifying the C source code to mgetty.
It works by hanging off the ringback facility. Ringback normally works
in the following way:

You dial your computer and wait till it rings a couple of times then
hangup. You wait a configurable length of time which might be 60
seconds lets say, then dial it up again. The call is answered after a
configurable number of rings, lets say 6 for example. If it doesen't
receive the 6 rings in a certain timeframe (say about 30 seconds) it
resets itself. Also, if it never receives a second call it resets.

My modifications hinge off deliberately not letting it ring 6 times.
On your second call after the waiting period, you let it ring a couple
of times then hangup. This is treated differently than if you never
made the second call. If the second call is never made it resets
itself, otherwise it execs a program specified in the config file.

The modifications still allow you to do all the regular things mgetty
can do (which is a lot!) including offering dialin access with
ringback. So you can still dial in via your household voice line and
not have your Grandma complain about the whistling noise.

The script could for example initiate a PPP dialup session. It would
be up to you to make it hangup after this. Perhaps [ echo
"/sbin/ifdown ppp0" | at now + 10 minutes ] included in the script
would do the trick. If you wanted it on longer you'd just login and
cancel the AT job.

I might even use it to restart my bigpond link, occasionally it goes
off the air, mostly when I want to access it remotely <grrrr>.

The changes happen to be made against mgetty-1.1.20 but it should be
easy enough to put into other versions.

---<GRiP>---
Grant Parnell [EMAIL PROTECTED] ([EMAIL PROTECTED]) 
Ph: 02-9715-6171  Mobile 0408-686-201 Web: http://www.poboxes.com/gripz


--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to