From owner-freebsd-questions@FreeBSD.ORG Wed Apr 2 05:31:11 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF3DE37B401; Wed, 2 Apr 2003 05:31:11 -0800 (PST) Received: from tomts13-srv.bellnexxia.net (tomts13-srv.bellnexxia.net [209.226.175.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7F5643FA3; Wed, 2 Apr 2003 05:31:08 -0800 (PST) (envelope-from matt@gsicomp.on.ca) Received: from gabby.gsicomp.on.ca ([65.95.176.5]) by tomts13-srv.bellnexxia.netESMTP <20030402133107.SNMB21994.tomts13-srv.bellnexxia.net@gabby.gsicomp.on.ca>; Wed, 2 Apr 2003 08:31:07 -0500 Received: from hermes (hermes.gsicomp.on.ca [192.168.0.18]) by gabby.gsicomp.on.ca (8.12.6/8.12.6) with SMTP id h32DS4iG040963; Wed, 2 Apr 2003 08:28:04 -0500 (EST) (envelope-from matt@gsicomp.on.ca) Message-ID: <00bc01c2f91b$f5bd1cc0$1200a8c0@gsicomp.on.ca> From: "Matthew Emmerton" To: "Dan Langille" , References: <3E8A9B83.6325.D150C9A@localhost> Date: Wed, 2 Apr 2003 08:29:58 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 cc: freebsd-net@freebsd.org Subject: Re: How do I specify a unit for ppp? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Apr 2003 13:31:12 -0000 ----- Original Message ----- From: "Dan Langille" To: Sent: Wednesday, April 02, 2003 8:12 AM Subject: How do I specify a unit for ppp? > >From man ppp I see this: > > The -unit flag tells ppp to only attempt to open /dev/tunN. > > I want it to use tun0. I can't see a way to specify a unit in > /etc/rc.conf. > > Clues? > -- > Dan Langille : http://www.langille.org/ We really need a ppp_flags variable in /etc/rc.conf which is recognized by /etc/rc.network for this kind of thing. Then you could specificy ppp_flags="-unit 0" in /etc/rc.conf and be on your way. Patches against 4.7-REL (sorry, I don't have an up-to-date -stable box). Comments requested; I will submit a PR with patches against -stable later today. --- rc.network.orig Wed Apr 2 08:23:43 2003 +++ rc.network Wed Apr 2 08:24:07 2003 @@ -284,7 +284,7 @@ ;; esac - ppp_command="${ppp_command} ${ppp_profile}" + ppp_command="${ppp_command} ${ppp_flags} ${ppp_profile}" echo "Starting ppp as \"${ppp_user}\"" su -m ${ppp_user} -c "exec ${ppp_command}" --- defaults/rc.conf.orig Wed Apr 2 08:23:12 2003 +++ defaults/rc.conf Wed Apr 2 08:23:36 2003 @@ -108,6 +108,7 @@ ppp_nat="YES" # Use PPP's internal network address translation or NO. ppp_profile="papchap" # Which profile to use from /etc/ppp/ppp.conf. ppp_user="root" # Which user to run ppp as +ppp_flags="" # Additional flags to pass to ppp(8). ### Network daemon (miscellaneous) ### syslogd_enable="YES" # Run syslog daemon (or NO). -- Matt Emmerton