Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Apr 2003 08:29:58 -0500
From:      "Matthew Emmerton" <matt@gsicomp.on.ca>
To:        "Dan Langille" <dan@langille.org>, <freebsd-questions@freebsd.org>
Cc:        freebsd-net@freebsd.org
Subject:   Re: How do I specify a unit for ppp?
Message-ID:  <00bc01c2f91b$f5bd1cc0$1200a8c0@gsicomp.on.ca>
References:  <3E8A9B83.6325.D150C9A@localhost>

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

----- Original Message -----
From: "Dan Langille" <dan@langille.org>
To: <freebsd-questions@freebsd.org>
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00bc01c2f91b$f5bd1cc0$1200a8c0>