From owner-freebsd-current Wed Jul 7 2:37:54 1999 Delivered-To: freebsd-current@freebsd.org Received: from florence.pavilion.net (florence.pavilion.net [194.242.128.25]) by hub.freebsd.org (Postfix) with ESMTP id 3CDB114C8F for ; Wed, 7 Jul 1999 02:37:50 -0700 (PDT) (envelope-from joe@florence.pavilion.net) Received: (from joe@localhost) by florence.pavilion.net (8.9.2/8.8.8) id KAA38376; Wed, 7 Jul 1999 10:37:47 +0100 (BST) (envelope-from joe) Date: Wed, 7 Jul 1999 10:37:46 +0100 From: Josef Karthauser To: Brian Somers Cc: Mark Thomas , freebsd-current@FreeBSD.org, Wayne Self Subject: Re: userland ppp - startup Message-ID: <19990707103746.A30024@pavilion.net> References: <3.0.6.32.19990704161654.00921c20@pop3.clark.net> <199907051959.UAA36719@dev.lan.awfulhak.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=a8Wt8u1KmwUX3Y2C X-Mailer: Mutt 0.95.4i In-Reply-To: <199907051959.UAA36719@dev.lan.awfulhak.org>; from Brian Somers on Mon, Jul 05, 1999 at 08:59:41PM +0100 X-NCC-RegID: uk.pavilion Organisation: Pavilion Internet plc, 24 The Old Steine, Brighton, BN1 1EL, England Phone: +44-845-333-5000 Fax: +44-845-333-5001 Mobile: +44-403-596893 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --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