From: Gilles E. <ges...@us...> - 2003-11-23 19:59:38
|
Update of /cvsroot/ipcop/ipcop/src/ppp In directory sc8-pr-cvs1:/tmp/cvs-serv8018/src/ppp Modified Files: Tag: IPCOP_v1 ip-down ip-up Log Message: Workaround for PPPoE reconnection problem :if reconnection fail when persist selected, after pppd exit do rc.red start , clean ppp/ip-up/ip-down of dhcp Index: ip-down =================================================================== RCS file: /cvsroot/ipcop/ipcop/src/ppp/ip-down,v retrieving revision 1.2.2.12 retrieving revision 1.2.2.13 diff -C2 -d -r1.2.2.12 -r1.2.2.13 *** ip-down 23 Sep 2003 18:35:08 -0000 1.2.2.12 --- ip-down 23 Nov 2003 19:59:35 -0000 1.2.2.13 *************** *** 17,25 **** my %pppsettings; - my %dhcpsettings; # read vars back from file. &readhash("${swroot}/ppp/settings", \%pppsettings); - &readhash("${swroot}/dhcp/settings", \%dhcpsettings); unlink "${swroot}/red/active"; --- 17,23 ---- *************** *** 36,39 **** --- 34,41 ---- system ('/bin/kill','-SIGHUP', $pid); } + } + + if ( -e "/var/ipcop/red/keepconnected") { + system ('/etc/rc.d/rc.connectioncheck &'); } Index: ip-up =================================================================== RCS file: /cvsroot/ipcop/ipcop/src/ppp/ip-up,v retrieving revision 1.2.2.16 retrieving revision 1.2.2.17 diff -C2 -d -r1.2.2.16 -r1.2.2.17 *** ip-up 23 Sep 2003 18:35:08 -0000 1.2.2.16 --- ip-up 23 Nov 2003 19:59:35 -0000 1.2.2.17 *************** *** 16,29 **** my %pppsettings; - my %dhcpsettings; # read vars back from file. &readhash("${swroot}/ppp/settings", \%pppsettings); - &readhash("${swroot}/dhcp/settings", \%dhcpsettings); if ( ( $pppsettings{'TYPE'} eq 'isdn') && ( $pppsettings{'COMPORT'} eq 'isdn2') && ( $pppsettings{'USEIBOD'} eq 'off') ) { ! system('/usr/sbin/isdnctrl', 'dial', 'ippp1'); } --- 16,27 ---- my %pppsettings; # read vars back from file. &readhash("${swroot}/ppp/settings", \%pppsettings); if ( ( $pppsettings{'TYPE'} eq 'isdn') && ( $pppsettings{'COMPORT'} eq 'isdn2') && ( $pppsettings{'USEIBOD'} eq 'off') ) { ! system('/usr/sbin/isdnctrl', 'dial', 'ippp1'); } *************** *** 32,45 **** my $secondarydns = $pppsettings{'DNS2'}; if ($dns eq 'Automatic') { ! if (!($pppsettings{'TYPE'} =~ /^isdn/)) ! { if (open(FILE, ">${swroot}/red/dns1")) { print FILE $ENV{'DNS1'}; close FILE; } if (open(FILE, ">${swroot}/red/dns2")) { print FILE $ENV{'DNS2'}; close FILE; } ! } ! else ! { if (open(FILE, ">${swroot}/red/dns1")) { print FILE $ENV{'MS_DNS1'}; close FILE; } if (open(FILE, ">${swroot}/red/dns2")) { print FILE $ENV{'MS_DNS2'}; close FILE; } ! } } else { if (open(FILE, ">${swroot}/red/dns1")) { print FILE $pppsettings{'DNS1'}; close FILE; } --- 30,43 ---- my $secondarydns = $pppsettings{'DNS2'}; if ($dns eq 'Automatic') { ! if (!($pppsettings{'TYPE'} =~ /^isdn/)) ! { if (open(FILE, ">${swroot}/red/dns1")) { print FILE $ENV{'DNS1'}; close FILE; } if (open(FILE, ">${swroot}/red/dns2")) { print FILE $ENV{'DNS2'}; close FILE; } ! } ! else ! { if (open(FILE, ">${swroot}/red/dns1")) { print FILE $ENV{'MS_DNS1'}; close FILE; } if (open(FILE, ">${swroot}/red/dns2")) { print FILE $ENV{'MS_DNS2'}; close FILE; } ! } } else { if (open(FILE, ">${swroot}/red/dns1")) { print FILE $pppsettings{'DNS1'}; close FILE; } |