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"
> [EMAIL PROTECTED] | 0xAA775B8B |      -- Anon
>
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message
>

*-----------------------------------*
*        Peter Ulrich Kruppa        *
*          -  Wuppertal -           *
*              Germany              *
*-----------------------------------*


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to