The following lines(##35-39) in /etc/init.d/net.ppp0 don't work because runscript.sh removes the link before stop() in net.ppp0 is executed: # Do our own cleanup if [ -L ${svcdir}/started/net.${IFACE} ] then rm -f ${svcdir}/started/net.${IFACE} fi But runscript.sh later restores the link. This is inconvenient because it is impossible to restore a lost connection without removing the ${svcdir}/started/net.ppp0 link by hand. Reproducible: Always Steps to Reproduce: 1./etc/init.d/net.ppp0 start 2.Break connection (e.g., unplug phone line from modem for a few seconds) 3.Try to reconnect with /etc/init.d/net.ppp0 start/stop Actual Results: /etc/init.d/net.ppp0 stop: ppp0 not up /etc/init.d/net.ppp0 start ppp0 already up Expected Results: Would be good if "/etc/init.d/net.ppp0" stop would remove the link so the /etc/init.d/net.ppp0 start can restore the connection. Better if "/etc/init.d/net.ppp0" start checks that link is broken and restores connection.
*** Bug 15336 has been marked as a duplicate of this bug. ***
This should fix it .. please test. ---------------------------------------------- Index: init.d/net.ppp0 =================================================================== RCS file: /home/cvsroot/gentoo-src/rc-scripts/init.d/net.ppp0,v retrieving revision 1.9 diff -u -r1.9 net.ppp0 --- init.d/net.ppp0 6 Jan 2003 21:32:43 -0000 1.9 +++ init.d/net.ppp0 24 Apr 2003 21:29:52 -0000 @@ -27,20 +27,6 @@ eerror "ppp0 is already up" return 1 fi - - if [ ! -e "/var/run/ppp-${IFACE}.pid" -a "${FUNCT}" = "stop" ] - then - eerror "ppp0 not up" - - # Do our own cleanup - if [ -L ${svcdir}/started/net.${IFACE} ] - then - rm -f ${svcdir}/started/net.${IFACE} - fi - - return 1 - fi - } start() { @@ -77,7 +63,9 @@ if [ -z "$(/sbin/ifconfig | egrep "${IFACE}")" ] then eerror "Interface seems to be down already" - return 1 + # We should return 0 here, else svc_stop() will not remove + # the 'started' symlink ... + return 0 fi # /sbin/ifconfig ${IFACE} down
Yes, this works for me.