3 # $FreeBSD: src/etc/rc.d/ppp-user,v 1.4 2003/04/18 17:55:05 mtm Exp $
18 local _punct_c _punct _ppp_unit
19 _profile
=${ppp_profile}
22 for _punct_c
in $_punct; do
23 _profile
=`ltr ${_profile} ${_punct_c} '_'`
28 if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
29 -a "${ppp_mode}" != "dedicated" \
30 -a "${ppp_mode}" != "background" ]; then
34 ppp_command
="/usr/sbin/ppp -quiet -${ppp_mode}"
40 ppp_command
="${ppp_command} -nat"
44 # Check whether we are asked to use a specific unit
46 eval _ppp_unit
=\
$ppp_${_profile}_unit
47 if [ -n "${_ppp_unit}" ]; then
48 ppp_command
="${ppp_command} -unit${_ppp_unit}"
51 ppp_command
="${ppp_command} ${ppp_profile}"
53 echo "Starting ppp as \"${ppp_user}\""
54 su
-m ${ppp_user} -c "exec ${ppp_command}"
59 pids
=`check_process /usr/sbin/ppp`
60 if [ -n "${pids}" ]; then
61 for pid
in ${pids}; do