From owner-freebsd-questions Fri Dec 20 9:43:48 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 539E237B401 for ; Fri, 20 Dec 2002 09:43:46 -0800 (PST) Received: from mailout08.sul.t-online.com (mailout08.sul.t-online.com [194.25.134.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9C87F43EDE for ; Fri, 20 Dec 2002 09:43:45 -0800 (PST) (envelope-from 520023893678-0001@t-online.de) Received: from fwd08.sul.t-online.de by mailout08.sul.t-online.com with smtp id 18PRBO-0003d0-04; Fri, 20 Dec 2002 18:43:34 +0100 Received: from pD9017277.dip.t-dialin.net (520023893678-0001@[217.1.114.119]) by fwd08.sul.t-online.com with esmtp id 18PRB8-19n8fAC; Fri, 20 Dec 2002 18:43:18 +0100 Date: Fri, 20 Dec 2002 18:42:44 +0000 (GMT) From: 520023893678-0001@t-online.de (P. U. Kruppa) To: Scott Mitchell Cc: "P. U. Kruppa" <520023893678-0001@t-online.de>, Jonathan Chen , Subject: Re: starting ppp on boot up In-Reply-To: <20021220152406.B29073@fishballoon.dyndns.org> Message-ID: <20021220183045.G934-100000@small.pukruppa.de> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Sender: 520023893678-0001@t-dialin.net Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 20 Dec 2002, Scott Mitchell wrote: > On Fri, Dec 20, 2002 at 02:31:20PM +0000, P. U. Kruppa wrote: > > In the meantime I found # man and copied/edited this > > - working - /usr/local/etc/rc.d - script: > > > > ------------------------------------------- > > #!/bin/sh - > > # > > # initialization/shutdown script for pppd > > case "$1" in > > start) > > /usr/sbin/ppp -nat -ddial adsl && echo -n ' pppd' > > ;; > > stop) > > kill `cat /var/run/foo.pid` && echo -n ' pppd' ^^^ Thanks Scott, now that you explained what this thing should do I found out that it should be kill ... /tun*.pid ... Uli. > > ;; > > *) > > echo "unknown option: $1 - should be 'start' or 'stop'" >&2 > > ;; > > esac > > ------------------------------------------ > > > > Does this do anything substantially different to your idea? > > No -- I expect that the command line actually executed will be the same in > either case. > > I guess the advantage of the script is that you have the 'stop' option as > well, which you don't get with rc.conf. On the other hand, it's one more > script you have to maintain. > > Personally I'd go with the rc.conf variables and use pppctl to shut down > the daemon if I ever needed to, but I think it's down to personal > preference at this point. > > Cheers, > > Scott > > -- > =========================================================================== > Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels > Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" > scott.mitchell@mail.com | 0xAA775B8B | -- Anon > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > *-----------------------------------* * Peter Ulrich Kruppa * * - Wuppertal - * * Germany * *-----------------------------------* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message