ppp (177649) | ppp (177683) |
---|---|
1#!/bin/sh 2# | 1#!/bin/sh 2# |
3# $FreeBSD: head/etc/rc.d/ppp 177649 2008-03-26 21:54:48Z brooks $ | 3# $FreeBSD: head/etc/rc.d/ppp 177683 2008-03-28 07:57:52Z brooks $ |
4# 5 6# PROVIDE: ppp 7# REQUIRE: netif isdnd 8# KEYWORD: nojail 9 10. /etc/rc.subr 11 12name="ppp" 13rcvar=`set_rcvar` 14command="/usr/sbin/${name}" 15start_cmd="ppp_start" 16stop_cmd="ppp_stop" 17start_postcmd="ppp_poststart" 18 19ppp_start_profile() 20{ | 4# 5 6# PROVIDE: ppp 7# REQUIRE: netif isdnd 8# KEYWORD: nojail 9 10. /etc/rc.subr 11 12name="ppp" 13rcvar=`set_rcvar` 14command="/usr/sbin/${name}" 15start_cmd="ppp_start" 16stop_cmd="ppp_stop" 17start_postcmd="ppp_poststart" 18 19ppp_start_profile() 20{ |
21 local _ppp_profile _ppp_mode _ppp_nat | 21 local _ppp_profile _ppp_mode _ppp_nat _ppp_unit |
22 23 _ppp_profile=$1 24 _ppp_profile_cleaned=$1 25 _punct=". - / +" 26 for _punct_c in $_punct; do 27 _ppp_profile_cleaned=`ltr ${_ppp_profile_cleaned} ${_punct_c} '_'` 28 done 29 --- 24 unchanged lines hidden (view full) --- 54 # Switch on NAT mode? 55 # 56 case ${_ppp_nat} in 57 [Yy][Ee][Ss]) 58 rc_flags="$rc_flags -nat" 59 ;; 60 esac 61 | 22 23 _ppp_profile=$1 24 _ppp_profile_cleaned=$1 25 _punct=". - / +" 26 for _punct_c in $_punct; do 27 _ppp_profile_cleaned=`ltr ${_ppp_profile_cleaned} ${_punct_c} '_'` 28 done 29 --- 24 unchanged lines hidden (view full) --- 54 # Switch on NAT mode? 55 # 56 case ${_ppp_nat} in 57 [Yy][Ee][Ss]) 58 rc_flags="$rc_flags -nat" 59 ;; 60 esac 61 |
62 # Check for hard wired unit 63 eval _ppp_unit=\$ppp_${_ppp_profile_cleaned}_unit 64 if [ -n "_ppp_unit" ]; then 65 _ppp_unit="-unit${_ppp_unit}" 66 fi 67 rc_flags="$rc_flags $_ppp_unit" 68 |
|
62 # Run! 63 # 64 su -m $ppp_user -c "$command ${rc_flags} ${_ppp_profile}" 65} 66 67ppp_start() 68{ 69 local _ppp_profile _p --- 53 unchanged lines hidden --- | 69 # Run! 70 # 71 su -m $ppp_user -c "$command ${rc_flags} ${_ppp_profile}" 72} 73 74ppp_start() 75{ 76 local _ppp_profile _p --- 53 unchanged lines hidden --- |