How do I specify a unit for ppp?
Matthew Emmerton
matt at gsicomp.on.ca
Wed Apr 2 05:31:12 PST 2003
----- Original Message -----
From: "Dan Langille" <dan at langille.org>
To: <freebsd-questions at 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
More information about the freebsd-questions
mailing list