mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-25 10:22:59 +02:00
Fix connscheduler reconnect
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user