Fix connscheduler reconnect

This commit is contained in:
Arne Fitzenreiter
2008-10-09 22:21:40 +02:00
parent c674e147f9
commit ed35052af0
3 changed files with 17 additions and 7 deletions

View File

@@ -77,10 +77,13 @@ sub hangup
}
# now wait for active triggerfile and ppp daemon to disappear
# wait maximum 60 seconds
my $counter = 60;
sleep 1;
while ( -e "${General::swroot}/red/active" || -e '/var/run/ppp-ipfire.pid' )
while ( -e "${General::swroot}/red/active" || -e '/var/run/ppp-ipfire.pid' || $counter == 0 )
{
sleep 1;
$counter--;
}
}
@@ -113,6 +116,15 @@ sub dial
sub reconnect
{
&hangup() if ( -e "${General::swroot}/red/active" );
# now wait for active triggerfile and ppp daemon to disappear
# wait maximum 60 seconds
my $counter = 60;
sleep 1;
while ( -e "${General::swroot}/red/active" || -e '/var/run/ppp-ipfire.pid' || $counter == 0 )
{
sleep 1;
$counter--;
}
&dial();
}