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

@@ -1,4 +1,4 @@
== List of softwares used to build IPFire Version: 2.3-beta4 ==
== List of softwares used to build IPFire Version: 2.3-test ==
* Archive-Tar-1.29
* Archive-Zip-1.16
* BerkeleyDB-0.27
@@ -231,6 +231,7 @@
* openswan-2.4.12
* openswan-2.4.12-kmod
* openvpn-2.0.9
* p7zip_4.58
* pam_mysql-0.7RC1
* patch-2.5.4
* pciutils-2.2.3

View File

@@ -374,11 +374,7 @@ case "${1}" in
boot_mesg -n "LEASEINFO Test failed! - " ${WARNING}
boot_mesg "dhcpcd is not running!" ${WARNING}
echo_warning
exit 1
fi
## Disable vnstat collection
/usr/bin/vnstat -u -i ${DEVICE} -r --disable > /dev/null 2>&1
elif [ "$TYPE" == "PPPOE" ]; then
boot_mesg "Bringing down the PPP interface ..."
@@ -401,10 +397,11 @@ case "${1}" in
fi
killall -w -s KILL /usr/sbin/pppd >/dev/null 2>&1
killall -w -s KILL br2684ctl >/dev/null 2>&1
rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
## Disable vnstat collection
/usr/bin/vnstat -u -i ${DEVICE} -r --disable > /dev/null 2>&1
rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
exit 0;
;;
esac

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();
}