Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 16313 Details for
Bug 26920
Stopping net.ppp0 service.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch that solves described bugs.
net.ppp0-hs.diff (text/plain), 2.76 KB, created by
Róbert Čerňanský
on 2003-08-19 05:52:15 UTC
(
hide
)
Description:
Patch that solves described bugs.
Filename:
MIME Type:
Creator:
Róbert Čerňanský
Created:
2003-08-19 05:52:15 UTC
Size:
2.76 KB
patch
obsolete
>--- net.ppp0.orig 2003-08-16 22:06:01.000000000 +0200 >+++ net.ppp0 2003-08-17 20:55:11.000000000 +0200 >@@ -3,6 +3,7 @@ > # Distributed under the terms of the GNU General Public License v2 > # Author: Martin Schlemmer <azarah@gentoo.org> > # Credits: To all those I got ideas from :) >+# Modified by HS > # > # $Header: /home/cvsroot/gentoo-src/rc-scripts/init.d/net.ppp0,v 1.14 2003/05/18 21:51:34 azarah Exp $ > >@@ -25,7 +26,7 @@ > if [ -e "/var/run/ppp-${IFACE}.pid" -o -e "/var/run/${IFACE}.pid" ] && \ > [ "${FUNCT}" = "start" ] > then >- eerror "ppp0 is already up" >+ eerror "${IFACE} is already up" > return 1 > fi > } >@@ -61,23 +62,52 @@ > if [ -x "$(which ifconfig)" ] > then > >- if [ -z "$(/sbin/ifconfig | egrep "${IFACE}")" ] >+ # Obtain interface name from pid file (IFACE is actually linkname) >+ if [ -e /var/run/ppp-${IFACE}.pid ] >+ then >+ IFNAME=$(egrep "ppp" /var/run/ppp-${IFACE}.pid) >+ fi >+ if [ -z "${IFNAME}" ] > then >+ IFNAME=${IFACE} >+ fi >+ >+ if [ -z "$(/sbin/ifconfig | egrep "${IFNAME}")" ] >+ then >+ >+ # Link is not up but pppd may be running > ewarn "Interface seems to be down already" >- # We should return 0 here, else svc_stop() will not remove >- # the 'started' symlink ... >- return 0 > fi > > # /sbin/ifconfig ${IFACE} down > if [ -e /var/run/ppp-${IFACE}.pid ] > then >- kill $(egrep -v "${IFACE}" /var/run/ppp-${IFACE}.pid) >- >+ PID=$(egrep -v "${IFNAME}" /var/run/ppp-${IFACE}.pid) > elif [ -e /var/run/${IFACE}.pid ] > then >- kill $(egrep -v "${IFACE}" /var/run/${IFACE}.pid) >+ PID=$(egrep -v "${IFNAME}" /var/run/${IFACE}.pid) > fi >+ >+ kill ${PID} >+ >+ # Check if pppd is not running (check it 10 times because pppd >+ # sometimes do not finish so fast) >+ PID=`pstree -p ${PID} | sed -e 's:^.*pppd::'` >+ PID=${PID:1:${#PID}-2} >+ COUNT=0 >+ while [ -n "${PID}" ] && [ ${COUNT} -lt 10 ] >+ do >+ sleep 0.5 >+ PID=`pstree -p ${PID} | sed -e 's:^.*pppd::'` >+ PID=${PID:1:${#PID}-2} >+ let COUNT++ >+ done >+ >+ if [ -n "${PID}" ] >+ then >+ eend 1 "Error stopping pppd" >+ fi >+ > fi > eend > } >@@ -163,16 +193,19 @@ > chmod 600 /etc/ppp/pap-secrets > > # Setup the chat file >- if [ -n "${INITSTRING}" ] >+ if [ "${AUTOCHATSCRIPT}" = "yes" ] > then >- sed -e "9i\\'OK\' \'${INITSTRING}\'" \ >- -e "s:\$NUMBER:${NUMBER}:" \ >- ${TEMPLATEDIR}/chat-default \ >- >/etc/ppp/chat-${PEER} >- else >- sed -e "s:\$NUMBER:${NUMBER}:" \ >- ${TEMPLATEDIR}/chat-default \ >- >/etc/ppp/chat-${PEER} >+ if [ -n "${INITSTRING}" ] >+ then >+ sed -e "9i\\'OK\' \'${INITSTRING}\'" \ >+ -e "s:\$NUMBER:${NUMBER}:" \ >+ ${TEMPLATEDIR}/chat-default \ >+ >/etc/ppp/chat-${PEER} >+ else >+ sed -e "s:\$NUMBER:${NUMBER}:" \ >+ ${TEMPLATEDIR}/chat-default \ >+ >/etc/ppp/chat-${PEER} >+ fi > fi > > # Setup the ip-scripts so long
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 26920
:
16313
|
20537
|
22394