ppp revision 151586
1#!/bin/sh 2# 3# $FreeBSD: head/etc/rc.d/ppp 151586 2005-10-23 14:06:53Z yar $ 4# 5 6# PROVIDE: ppp-user 7# REQUIRE: netif isdnd 8# KEYWORD: nojail 9 10. /etc/rc.subr 11 12name="ppp" 13rcvar=`set_rcvar` 14command="/usr/sbin/ppp" 15start_precmd="ppp_precmd" 16start_postcmd="ppp_postcmd" 17 18ppp_precmd() 19{ 20 # Establish ppp mode. 21 # 22 if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \ 23 -a "${ppp_mode}" != "dedicated" \ 24 -a "${ppp_mode}" != "background" ]; then 25 ppp_mode="auto" 26 fi 27 28 rc_flags="$rc_flags -quiet -${ppp_mode}" 29 30 # Switch on NAT mode? 31 # 32 case ${ppp_nat} in 33 [Yy][Ee][Ss]) 34 rc_flags="$rc_flags -nat" 35 ;; 36 esac 37 38 rc_flags="$rc_flags ${ppp_profile}" 39} 40 41ppp_postcmd() 42{ 43 # Re-Sync ipfilter so it picks up any new network interfaces 44 # 45 /etc/rc.d/ipfilter resync 46} 47 48load_rc_config $name 49run_rc_command "$1" 50