diff options
author | brooks <brooks@FreeBSD.org> | 2008-03-28 07:57:52 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2008-03-28 07:57:52 +0000 |
commit | c19e2cda05cf54b8bffe20fcd61dd6879de0aa9c (patch) | |
tree | d54a89ed6645652c2baa4a9325277102f4724ca2 /etc | |
parent | b37acc3c8a0967e0ea1a436c1e7579a3e6d0b164 (diff) | |
download | FreeBSD-src-c19e2cda05cf54b8bffe20fcd61dd6879de0aa9c.zip FreeBSD-src-c19e2cda05cf54b8bffe20fcd61dd6879de0aa9c.tar.gz |
Add support for hardwiring ppp sessions to particular devices with new
per-profile variables of the form ppp_<profile>_unit. No ppp_unit
variable is supported since tying the same unit to more than one profile
won't work.
PR: conf/122127
MFC after: 1 week
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.d/ppp | 9 |
1 files changed, 8 insertions, 1 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}" |