*BSD News Article 85025


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.ecn.uoknor.edu!news.wildstar.net!newsfeed.direct.ca!op.net!news.mathworks.com!howland.erols.net!newsfeed.internetmci.com!stdio!heathers!biswick
From: biswick@heathers.stdio.com (Chad Hall)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Tips : Dynamic PPP On-Demand Setup
Date: 16 Dec 1996 19:01:05 GMT
Organization: Open World
Lines: 40
Message-ID: <59469h$pc7@stargate.stdio.com>
References: <58jrqe$vks@lantana.singnet.com.sg> <87k9qnaglm.fsf@luddite.org>
NNTP-Posting-Host: heathers.stdio.com
X-Newsreader: TIN [version 1.2 PL2]
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:32705

Jay Sachs (sachs@interactive.net) wrote:

: A good place for this is in /etc/rc.local:

:   echo -n 'starting local daemons:'

:   # put your local stuff here
:   /usr/sbin/ppp -auto ondemand >/dev/null 2>&1 && echo -n ' ppp'

There is also a way to start it up with the rest of your network drivers.
In /etc/netstart there is this:

# Set up all the network interfaces, calling startup scripts if needed
for ifn in ${network_interfaces}; do
        if [ -e /etc/start_if.${ifn} ]; then
                . /etc/start_if.${ifn} ${ifn}
        fi
        eval ifconfig_args=\$ifconfig_${ifn}
        ifconfig ${ifn} ${ifconfig_args} 
        ifconfig ${ifn} 
done    


So, if you make a start_if.tun0 in /etc with:
#!/bin/sh
/usr/sbin/ppp -auto ondemand

ppp will start up with the rest of the networks, and things like rwho will
recognise it as a valid interface.

This is all assuming that you have tun0 in sysconfig.  I don't know how well
it would work with non-static ips, but works fine for me.

Chad.

---
                      Chad Hall  - -  biswick@stdio.com
     The Unofficial .signature Of The 1996 Summer Olympics In Atlanta
   Any unsolicited email received by this account may be subject to a $75
                       processing and proofreading fee.