tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ppp rcvar
On Tue, Aug 21, 2012 at 05:26:26PM +0100, David Brownlee wrote:
> On 21 August 2012 16:56, Patrick Welche <prlw1%cam.ac.uk@localhost> wrote:
> > On Tue, Aug 21, 2012 at 10:36:56AM -0500, Jeremy C. Reed wrote:
> >> On Tue, 21 Aug 2012, Patrick Welche wrote:
> >>
> >> > Is the lack of rcvar in rc.d/ppp intentional or an oversight?
> >> >
> >> > (Now I'm not sure if I had put ppp=NO or pppd=NO in rc.conf, and was then
> >> > surprised that the phone was engaged hours after booting)
> >>
> >> http://mail-index.netbsd.org/tech-misc/2008/02/23/msg000005.html
> >>
> >> Some of the thread answers why it happened.
> >
> > It seems that ppp isn't considered in the thread. I would expect ppp=YES to
> > mean at boot run ppp and connect to $ppp_peers | /etc/ppp/peers. If ppp=NO
> > then wait for a /etc/rc.d/ppp onestart.
> >
> > Thoughts?
>
> Makes perfect sense to me - providing the defaults are left at YES I
> cannot imagine why almost all rc.d files should be checking an
> rcvar...
Unfortunately I'm not near the computer-with-modem to test, but hopefully
the attached should do the trick?
Cheers,
Patrick
Index: defaults/rc.conf
===================================================================
RCS file: /cvsroot/src/etc/defaults/rc.conf,v
retrieving revision 1.120
diff -u -r1.120 rc.conf
--- defaults/rc.conf 13 Aug 2012 08:20:44 -0000 1.120
+++ defaults/rc.conf 23 Aug 2012 15:51:42 -0000
@@ -179,7 +179,7 @@
dhclient=NO # behave as a DHCP client
dhclient_flags="" # blank: config all interfaces
ntpdate=NO ntpdate_flags="-b -s" # May need '-u' thru firewall
-ppp_peers="" # /etc/ppp/peers to call
+ppp=YES ppp_peers="" # /etc/ppp/peers to call
ip6mode=host # host, autohost or router
ip6uniquelocal=NO # IPv6 unique-local forwarding
rtsol=NO rtsol_flags="-a" # for ip6mode=autohost only
Index: rc.d/ppp
===================================================================
RCS file: /cvsroot/src/etc/rc.d/ppp,v
retrieving revision 1.8
diff -u -r1.8 ppp
--- rc.d/ppp 11 Oct 2004 15:00:51 -0000 1.8
+++ rc.d/ppp 23 Aug 2012 15:51:42 -0000
@@ -14,6 +14,7 @@
$_rc_subr_loaded . /etc/rc.subr
name="ppp"
+rcvar=$name
start_cmd="ppp_start"
stop_cmd="ppp_stop"
sig_stop="-INT"
@@ -40,6 +41,8 @@
fi
done
echo "."
+ else
+ warn "\${ppp_peers} is not set - pppd was not started."
fi
}
Home |
Main Index |
Thread Index |
Old Index