FreeBSD Bugzilla – Attachment 71911 Details for
Bug 104623
"rc.d/ppp restart" stops all instances of ppp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
rcd-ppp-patch
rcd-ppp-patch (text/plain; charset=us-ascii), 2.34 KB, created by
Mike Makonnen
on 2007-10-20 01:17:33 UTC
(
hide
)
Description:
rcd-ppp-patch
Filename:
MIME Type:
Creator:
Mike Makonnen
Created:
2007-10-20 01:17:33 UTC
Size:
2.34 KB
patch
obsolete
>Index: etc/rc.d/ppp >=================================================================== >RCS file: /home/ncvs/src/etc/rc.d/ppp,v >retrieving revision 1.11.2.3 >retrieving revision 1.15 >diff -u -r1.11.2.3 -r1.15 >--- etc/rc.d/ppp 15 May 2007 08:01:42 -0000 1.11.2.3 >+++ etc/rc.d/ppp 18 Oct 2007 17:10:40 -0000 1.15 >@@ -12,30 +12,70 @@ > name="ppp" > rcvar=`set_rcvar` > command="/usr/sbin/${name}" >-start_precmd="ppp_prestart" >+start_cmd="ppp_start" >+stop_cmd="ppp_stop" > start_postcmd="ppp_poststart" > >-ppp_prestart() >+ppp_start_profile() > { >+ local _ppp_profile _ppp_mode _ppp_nat >+ >+ _ppp_profile=$1 >+ >+ # Check for ppp profile mode override. >+ # >+ eval _ppp_mode=\$ppp_${_ppp_profile}_mode >+ if [ -z "$_ppp_mode" ]; then >+ _ppp_mode=$ppp_mode >+ fi >+ >+ # Check for ppp profile nat override. >+ # >+ eval _ppp_nat=\$ppp_${_ppp_profile}_nat >+ if [ -z "$_ppp_nat" ]; then >+ _ppp_nat=$ppp_nat >+ fi >+ > # Establish ppp mode. > # >- if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \ >- -a "${ppp_mode}" != "dedicated" \ >- -a "${ppp_mode}" != "background" ]; then >- ppp_mode="auto" >+ if [ "${_ppp_mode}" != "ddial" -a "${_ppp_mode}" != "direct" \ >+ -a "${_ppp_mode}" != "dedicated" \ >+ -a "${_ppp_mode}" != "background" ]; then >+ _ppp_mode="auto" > fi > >- rc_flags="$rc_flags -quiet -${ppp_mode}" >+ rc_flags="-quiet -${_ppp_mode}" > > # Switch on NAT mode? > # >- case ${ppp_nat} in >+ case ${_ppp_nat} in > [Yy][Ee][Ss]) > rc_flags="$rc_flags -nat" > ;; > esac > >- rc_flags="$rc_flags ${ppp_profile}" >+ # Run! >+ # >+ su -m $ppp_user -c "$command ${rc_flags} ${_ppp_profile}" >+} >+ >+ppp_start() >+{ >+ local _ppp_profile _p >+ >+ _ppp_profile=$* >+ if [ -z "${_ppp_profile}" ]; then >+ _ppp_profile=$ppp_profile >+ fi >+ >+ echo -n "Starting PPP profile:" >+ >+ for _p in $_ppp_profile; do >+ echo -n " $_p" >+ ppp_start_profile $_p >+ done >+ >+ echo "." > } > > ppp_poststart() >@@ -46,5 +86,32 @@ > /etc/rc.d/pf resync > } > >+ppp_stop_profile() { >+ local _ppp_profile >+ >+ _ppp_profile=$1 >+ >+ /bin/pkill -f "^${command}.*[[:space:]]${_ppp_profile}\$" || \ >+ echo -n "(not running)" >+} >+ >+ppp_stop() { >+ local _ppp_profile _p >+ >+ _ppp_profile=$* >+ if [ -z "${_ppp_profile}" ]; then >+ _ppp_profile=$ppp_profile >+ fi >+ >+ echo -n "Stopping PPP profile:" >+ >+ for _p in $_ppp_profile; do >+ echo -n " $_p" >+ ppp_stop_profile $_p >+ done >+ >+ echo "." >+} >+ > load_rc_config $name >-run_rc_command "$1" >+run_rc_command $*
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 104623
:
71910
| 71911