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 anything. 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?) 19a20,28 > 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 > 91c100 < connect "/usr/sbin/chat $chatdbg -f $CHATSCRIPT" --- > connect "/usr/sbin/chat -r /var/run/ifup-$DEVICE $chatdbg -f $CHATSCRIPT" 120a130 > rm -f /var/run/ifup-$DEVICE
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...)