diff options
-rw-r--r-- | etc/rc.d/ppp | 9 | ||||
-rw-r--r-- | share/man/man5/rc.conf.5 | 10 |
2 files changed, 17 insertions, 2 deletions
diff --git a/etc/rc.d/ppp b/etc/rc.d/ppp index 7d0f9ba..fa4565f 100644 --- a/etc/rc.d/ppp +++ b/etc/rc.d/ppp @@ -18,7 +18,7 @@ start_postcmd="ppp_poststart" ppp_start_profile() { - local _ppp_profile _ppp_mode _ppp_nat + local _ppp_profile _ppp_mode _ppp_nat _ppp_unit _ppp_profile=$1 _ppp_profile_cleaned=$1 @@ -59,6 +59,13 @@ ppp_start_profile() ;; esac + # Check for hard wired unit + eval _ppp_unit=\$ppp_${_ppp_profile_cleaned}_unit + if [ -n "_ppp_unit" ]; then + _ppp_unit="-unit${_ppp_unit}" + fi + rc_flags="$rc_flags $_ppp_unit" + # Run! # su -m $ppp_user -c "$command ${rc_flags} ${_ppp_profile}" diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index b6cd48d..7eba2df 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -1322,7 +1322,9 @@ The name of the profile to use from Also used for per-profile overrides of .Va ppp_mode and -.Va ppp_nat . +.Va ppp_nat , +and +.Va ppp_ Ns Ao Ar profile Ac Ns _unit . When the profile name contains any of the characters .Dq Li .-/+ they are translated to @@ -1361,6 +1363,12 @@ Overrides the global .Va ppp_nat for .Ar profile . +.It Va ppp_ Ns Ao Ar profile Ac Ns _unit +.Pq Vt int +Set the unit number to be used for this profile. +See the manual description of +.Fl unit Ns Ar N +for details. .It Va ppp_user .Pq Vt str The name of the user under which |