Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: Luke Drumm on September 09, 1999, 10:45:18 AM

Title: Set Dialup times
Post by: Luke Drumm on September 09, 1999, 10:45:18 AM
Hi,

Does anybody know how to modify the 'automatic' connection attributes of the Dial-up server configuration? (ie. when it receives an 'outbound' packet it automatically connects to my ISP).
My end goal is to have the box in question, automatically connect & disconnect from my ISP at set times of the day so that I can access it remotely (from work).

I'm fairly sure I could modify the connection scripts (& cronjobs) so that they only run during certain times but:
a) Is this the best way to do it?
b) Is this likely to 'hurt' any other processes higher up the proverbial chain?
c) How do I make sure the connection stays up for the time I want?

Regards,
Luke
Title: RE: Set Dialup times
Post by: Joseph Morrison on September 09, 1999, 04:22:35 PM
Hi Luke,

You're on the right track. A cron job is the best way to periodically trigger a connection. I'm not sure of the best way to keep the connection up, though. Perhaps the cron job could do a "ping" every 10 seconds during the time you want the connection kept up. That way you'd just have to write a tricky cron rule, and that's all.

This shouldn't hurt any other processes on the system.

The one caution is to make sure you edit the template, not the actual cron file. The template is called:

/etc/e-smith/templates/etc/crontab

When you've changed the file, run the command:

/sbin/e-smith/signal-event manager-misc

Which will regenerate the real configuration files from the templates. (If you make the mistake of editing the configuration files directly, they will get overwritten next time you use the e-smith manager or console.)

Good luck!
Title: RE: Set Dialup times
Post by: Luke Drumm on September 10, 1999, 05:39:04 AM
Thanks,

As a side issue I was wondering whether it might be easier/conceptually nicer to alter the higher level "dial-on-demand" scripts rather then the lower level ppp connection scripts.

If the higher scripts are the way to go, does anybody have some details or examples on how I might approach this?

Regards,
Luke
Title: RE: Set Dialup times
Post by: Peter Marriott on September 10, 1999, 07:44:02 AM
Hi Luke,

I was looking at doing something similar last night, but I needed mine to stay up all the time.  So I checked out the diald man pages and it has a command called called 'up' which will force the connection up.  It also has some timing options so you can specify exactly when it should be up etc.  I placed these command directly in the diald.conf file and they worked like a charm.

I have a permanent modem connection.  I would have though that this would be a relatively common scenario, so it would be nice if e-smith had the option of having one of the devices in a dedicated conection to be a modem.   Apart from this I think e-smith is excellent and will grow into a super product.

Cheers
Peter
Title: RE: Set Dialup times
Post by: Charlie Brady on September 17, 1999, 09:40:40 AM
Peter Marriott wrote:
-------------------------------

>I was looking at doing something similar
> last night, but I needed mine to stay up
> all the time.  So I checked out the diald
> man pages and it has a command called
> called 'up' which will force the connection
> up.  It also has some timing options so you
> can specify exactly when it should be up
> etc.  I placed these command directly in
> the diald.conf file and they worked like a
> charm.

To make sure that you don't ever lose your changes, make the same change in /etc/e-smith/templates/etc/diald.conf.

> I have a permanent modem connection.  I
> would have thought that this would be a
> relatively common scenario, so it would be
> nice if e-smith had the option of having
> one of the devices in a dedicated conection
> to be a modem.

I've raised that in discussion on the e-smith developer mailing list. The economics of dialup connections vary from place to place, so all of on-demand, periodic and permanent dialup makes sense. If you can work out how to configure diald to do both periodic and permanent dialup then I'll do my best to get it put into the mangement interface.

We could do permanent dialup by leaving out diald alltogether, and changing the pppd configuration, but I think it is simpler and cleaner to just reconfigure diald. Looking forward to hearing you tell us exactly how! :-)