From: <ow...@us...> - 2010-09-18 06:51:52
|
Revision: 4962 http://ipcop.svn.sourceforge.net/ipcop/?rev=4962&view=rev Author: owes Date: 2010-09-18 06:51:46 +0000 (Sat, 18 Sep 2010) Log Message: ----------- In some cases rc.updatered takes several seconds to finish. pppd only waits 5 seconds, before killin g ip-down which can cause rc.connectioncheck not being started. Running rc.updatered seperately and waiting for rc.updatered to finish in rc.connectioncheck fixes it. Add same procedure in ip-up. Modified Paths: -------------- ipcop/trunk/config/ppp/ip-down ipcop/trunk/config/ppp/ip-up ipcop/trunk/src/rc.d/rc.connectioncheck ipcop/trunk/updates/1.9.16/ROOTFILES.i486-1.9.16 Modified: ipcop/trunk/config/ppp/ip-down =================================================================== --- ipcop/trunk/config/ppp/ip-down 2010-09-16 11:22:14 UTC (rev 4961) +++ ipcop/trunk/config/ppp/ip-down 2010-09-18 06:51:46 UTC (rev 4962) @@ -27,7 +27,7 @@ umask 022; unlink('/var/ipcop/red/active'); -system('/etc/rc.d/rc.updatered ppp down'); +system('/etc/rc.d/rc.updatered ppp down &'); if ( -e '/var/ipcop/red/keepconnected') { @@ -44,8 +44,9 @@ if (system('/bin/ps ax | /bin/grep -q "[r]c.connectioncheck reconnect"')) { system('/etc/rc.d/rc.connectioncheck reconnect &'); + &General::log('red', 'rc.connectioncheck reconnect started') if ($pppsettings{'DEBUG'} eq 'on'); } else { - &General::log('rc.connectioncheck reconnect already running'); + &General::log('red', 'rc.connectioncheck reconnect already running') if ($pppsettings{'DEBUG'} eq 'on'); } } Modified: ipcop/trunk/config/ppp/ip-up =================================================================== --- ipcop/trunk/config/ppp/ip-up 2010-09-16 11:22:14 UTC (rev 4961) +++ ipcop/trunk/config/ppp/ip-up 2010-09-18 06:51:46 UTC (rev 4962) @@ -64,4 +64,4 @@ system("/sbin/ip route add default dev $ARGV[0] via $ARGV[4]"); system('/usr/bin/touch /var/ipcop/red/active'); -system('/etc/rc.d/rc.updatered ppp up'); +system('/etc/rc.d/rc.updatered ppp up &'); Modified: ipcop/trunk/src/rc.d/rc.connectioncheck =================================================================== --- ipcop/trunk/src/rc.d/rc.connectioncheck 2010-09-16 11:22:14 UTC (rev 4961) +++ ipcop/trunk/src/rc.d/rc.connectioncheck 2010-09-18 06:51:46 UTC (rev 4962) @@ -156,9 +156,14 @@ system("/etc/rc.d/rc.red start"); } elsif ($ARGV[0] eq 'reconnect') { + # Wait for [p]ppd to finish while (! system("/bin/ps ax | /bin/grep -q [p]ppd") ) { sleep 2; } + # Wait for rc.updatered to finish + while (! system("/bin/ps ax | /bin/grep -q updatered") ) { + sleep 2; + } if ($pppsettings{'PROTOCOL'} eq 'RFC1483') { # remove bridged/routed user-space programs Modified: ipcop/trunk/updates/1.9.16/ROOTFILES.i486-1.9.16 =================================================================== --- ipcop/trunk/updates/1.9.16/ROOTFILES.i486-1.9.16 2010-09-16 11:22:14 UTC (rev 4961) +++ ipcop/trunk/updates/1.9.16/ROOTFILES.i486-1.9.16 2010-09-18 06:51:46 UTC (rev 4962) @@ -1,4 +1,5 @@ ## please place IPCop files first, then packages sorted by alphabetical order +/etc/rc.d/rc.connectioncheck /etc/rc.d/rc.flash.up /etc/rc.d/rc.red /home/httpd/cgi-bin/addresses.cgi @@ -72,6 +73,10 @@ /usr/sbin/parted /usr/sbin/partprobe ## +## ppp up/down scripts +/etc/ppp/ip-down +/etc/ppp/ip-up +## ## ulogd config file /etc/ulogd.conf ## This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |