Bug 5460 - ifdown dosen't hangup when ifup is called twice or more times for a ppp device
Summary: ifdown dosen't hangup when ifup is called twice or more times for a ppp device
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: initscripts
Version: 6.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-10-01 00:40 UTC by bogado
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-10-07 20:04:23 UTC

Attachments (Terms of Use)

Description bogado 1999-10-01 00:40:12 UTC
When ifup is called twice the second ifup-ppp overwrites
the pid file for pppd with a bogus pid of a pppd that will
die in seconds due to the modem device being locked by the
first pppd.

	The following diff fixes the problem, it is prepared from
the ifup-ppp included in the initscripts-4.16-1. I basicly
creates yet another lock file ifup-$DEVICE in the /var/run
dir. The ifup-ppp checks if this file exists before doing

	It also uses this files to hold 'REPORT' lines from the
chat scripts (I don't know if I missed something here but
there is no way of doing this directly from the
ifcfg-$DEVICE file does it?)

> if [ -f /var/run/ifup-$DEVICE ] ; then
>   # I'm already connected or trying to connect
>   logger -p daemon.info -t ifup-ppp \
>     "Already connected or trying to connect to $DEVICE"
>   exit 1
> fi
> echo > /var/run/ifup-$DEVICE
<     connect "/usr/sbin/chat $chatdbg -f $CHATSCRIPT"
>     connect "/usr/sbin/chat -r /var/run/ifup-$DEVICE
$chatdbg -f $CHATSCRIPT"
>     rm -f /var/run/ifup-$DEVICE

Comment 1 Michael K. Johnson 1999-10-07 20:04:59 UTC
ifup-ppp and ifdown-ppp are fragile in other ways as well in that
version of initscripts.  For Red Hat Linux 6.1, I rearchitected
PPP session management using a "ppp-watch" daemon, which has made
if{up,down}-ppp absolutely reliable in my torture tests.

I do not know if you can upgrade initscripts without upgrading
many other packages as well, but you can try (just keep your
old packages around to revert to in case of trouble...)

Note You need to log in before you can comment on or make changes to this bug.