From owner-freebsd-questions Mon Jul 31 08:41:15 1995 Return-Path: questions-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.11/8.6.6) id IAA29841 for questions-outgoing; Mon, 31 Jul 1995 08:41:15 -0700 Received: from tale.frihet.com (ns.frihet.com [165.227.57.1]) by freefall.cdrom.com (8.6.11/8.6.6) with ESMTP id IAA29827 for ; Mon, 31 Jul 1995 08:41:11 -0700 Received: from localhost.frihet.com (tweten@localhost.frihet.com [127.0.0.1]) by tale.frihet.com (8.6.10/8.6.6) with SMTP id IAA28805; Mon, 31 Jul 1995 08:39:52 -0700 Message-Id: <199507311539.IAA28805@tale.frihet.com> X-Authentication-Warning: tale.frihet.com: Host localhost.frihet.com didn't use HELO protocol X-Mailer: exmh version 1.5.3 12/28/94 Reply-To: "David E. Tweten" To: john@starfire.mn.org cc: questions@FreeBSD.org (FreeBSD questions) Subject: Re: ppp restart methods Date: Mon, 31 Jul 1995 08:39:51 -0700 From: "David E. Tweten" Sender: questions-owner@FreeBSD.org Precedence: bulk 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 1.1.5.1 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 = | tweten@frihet.com 12141 Atrium Drive | E9 59 E7 5C 6B 88 B8 90 | tweten@and.com 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.