Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Jul 1999 10:37:46 +0100
From:      Josef Karthauser <joe@pavilion.net>
To:        Brian Somers <brian@Awfulhak.org>
Cc:        Mark Thomas <thomas@clark.net>, freebsd-current@FreeBSD.org, Wayne Self <wself@cdrom.com>
Subject:   Re: userland ppp - startup
Message-ID:  <19990707103746.A30024@pavilion.net>
In-Reply-To: <199907051959.UAA36719@dev.lan.awfulhak.org>; from Brian Somers on Mon, Jul 05, 1999 at 08:59:41PM %2B0100
References:  <3.0.6.32.19990704161654.00921c20@pop3.clark.net> <199907051959.UAA36719@dev.lan.awfulhak.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii

On Mon, Jul 05, 1999 at 08:59:41PM +0100, Brian Somers wrote:
> [-current cc'd - please don't make this a big thread !]
> /etc/start_if.tun0 with an ``exec ppp ...''.  This starts things up 
> at the correct point.
> 
> However, maybe it's time for a knob in rc.conf ?  Something like
> 
> ppp_enable="NO"         # Start user-ppp
> ppp_alias="YES"         # Packet aliasing (NAT/masquerading)
> ppp_mode="auto"         # Usually auto or ddial
> ppp_profile="papchap"   # Which profile to read from /etc/ppp/ppp.conf
> 
> We'd also need a default /etc/ppp/ppp.conf that contains a papchap 
> profile as this seems to be what most ISPs give you these days.  I'd 
> also include a commented-out ``set login'' with an appropriate 
> comment.  Sysinstall may need to be adjusted too...
> 
> Suggestions/objections ?  If not, I'll commit soon (unless you want 
> to do the work Joe ;*)

Something like this should do it.  It may be nice to also allow the
authname/authkey to be specified on the command line so that they
can easily be set in rc.conf, by hand or by sysinstall.

Joe
-- 
Josef Karthauser	FreeBSD: How many times have you booted today?
Technical Manager	Viagra for your server (http://www.uk.freebsd.org)
Pavilion Internet plc.  [joe@pavilion.net, joe@uk.freebsd.org, joe@tao.org.uk]

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="rc.conf-patch"

--- /etc/defaults/rc.conf	Wed Jun 30 22:02:32 1999
+++ rc.conf	Tue Jul  6 23:39:13 1999
@@ -50,6 +50,13 @@
 #sppp_interfaces="isp0"		# example: sppp over ISDN
 #spppconfig_isp0="authproto=chap myauthname=foo myauthsecret='top secret' hisauthname=some-gw hisauthsecret='another secret'"
 
+# Use ppp configuration.
+ppp_enable="NO"		# Start user-ppp (or NO).
+ppp_mode="auto"		# Choice of "auto", "ddial", "direct" or "dedicated".
+			# For details see man page for ppp(8). Default is auto.
+ppp_alias="YES"		# Packet aliasing (NAT/masquerading) or NO.
+ppp_profile="papchap"	# Which profile to use from /etc/ppp/ppp.conf.
+
 ### Network daemon (miscellaneous) & NFS options: ###
 syslogd_enable="YES"		# Run syslog daemon (or NO).
 syslogd_flags=""		# Flags to syslogd (if enabled).

--a8Wt8u1KmwUX3Y2C
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="rc.network-patch"

--- rc.network-orig	Tue Jul  6 20:19:26 1999
+++ rc.network	Tue Jul  6 22:24:50 1999
@@ -128,6 +128,23 @@
 	fi
     fi
 
+    # Warm up user ppp if required.
+    if [ "X$ppp_enable" = X"YES" ]; then
+	    # Establish ppp mode.
+	    if [ "X$ppp_mode" != X"ddial" -a "X$ppp_mode" != X"direct" \
+		-a "X$ppp_mode" != X"dedicated" ]; then \
+	        ppp_mode="auto";
+	    fi
+	    ppp_command="-${ppp_mode} ";
+
+	    # Switch on alias mode?
+	    if [ "X$ppp_alias" = "YES" ]; then
+		ppp_command="${ppp_command} -alias";
+	    fi
+
+	    echo -n 'Starting ppp: '; ppp ${ppp_command} ${ppp_profile}
+    fi
+
     # Additional ATM interface configuration
     if [ -n "${atm_pass1_done}" ]; then
 	    atm_pass2


--a8Wt8u1KmwUX3Y2C--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990707103746.A30024>