John Lind writes:
> I see three basic mechanisms to automatically restarting pppd when a full-
> time link is desired.
> 1) checking periodically (e.g. cron) to see if the link is up, and restarting
> it if it is not.
> 2) use the -detach option to pppd and have a script in a loop-forever
> restarting it
> 3) use the "disconnect" option to start a script which forks a process
> to sleep for a few seconds, and then restart the daemon
For reasons that escape me, my favorite solution to the problem seems to get
little attention on this list. It is:
4) Put a reference to pppd into /etc/ttys. Set the modem option so pppd will
clean up and quit when it loses the phone connection. Set the -detach option,
so init can keep track of it.
You have to use pppd version 2.1.1 or later, so the modem option will work
correctly. The version of pppd that came with FreeBSD 188.8.131.52 was too early.
Otherwise, no problems. Pppd starts automatically as the system goes into
multi-user mode. When the line drops, init restarts pppd almost immediately,
the connection is typically remade within a minute, and all my TCP connections
survive across the dropped connection.
For "a full-time link" I see no reason to even consider anything else.
David E. Tweten | PGP Key fingerprint = | email@example.com
12141 Atrium Drive | E9 59 E7 5C 6B 88 B8 90 | firstname.lastname@example.org
Saratoga, CA 95070-3162 | 65 30 2A A4 A0 BC 49 AE | (408) 446-4131
The only flags worth saluting are those you are permitted to burn.