]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Corrected dhcp.cgi sorting issue
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 25 Jul 2008 21:00:51 +0000 (21:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 25 Jul 2008 21:00:51 +0000 (21:00 +0000)
Fixed T-Online not responding to ping requests

config/cfgroot/header.pl
config/rootfiles/updater/filelists/core15
src/ppp/ip-up

index e3098177819ea88a41c8f29245f47b788576469b..3a2c932e324959727f7cee2af5d6a0a24dbc08ee 100644 (file)
@@ -353,7 +353,7 @@ sub CheckSortOrder {
 #Sorting of allocated leases
     if ($ENV{'QUERY_STRING'} =~ /^IPADDR|^ETHER|^HOSTNAME|^ENDTIME/ ) {
         my $newsort=$ENV{'QUERY_STRING'};
-        &readhash("${swroot}/dhcp/settings", \%dhcpsettings);
+        &General::readhash("${swroot}/dhcp/settings", \%dhcpsettings);
         $act=$dhcpsettings{'SORT_LEASELIST'};
         #Reverse actual ?
         if ($act =~ $newsort) {
@@ -362,7 +362,7 @@ sub CheckSortOrder {
         };
 
         $dhcpsettings{'SORT_LEASELIST'}=$newsort;
-        &writehash("${swroot}/dhcp/settings", \%dhcpsettings);
+        &General::writehash("${swroot}/dhcp/settings", \%dhcpsettings);
         $dhcpsettings{'ACTION'} = 'SORT';  # avoid the next test "First lauch"
     }
 
index f4ec6e1fc434019cede3584cdf5028da8977676e..8fdea808dfd38caef8a52ff70121f1731827b8a4 100644 (file)
@@ -12,6 +12,7 @@ srv/web/ipfire/cgi-bin/graphs.cgi
 srv/web/ipfire/cgi-bin/outgoingfw.cgi
 var/ipfire/langs
 var/ipfire/graphs.pl
+var/ipfire/header.pl
 var/ipfire/outgoing/bin/outgoingfw.pl
 var/ipfire/urlfilter/autoupdate/autoupdate.urls
 usr/share/terminfo/x/xterm-color
index 0f32820c08c390140423e95ec49672d2ea877a75..80fb49f49e1c2a5176860545535f03db5cd403af 100644 (file)
@@ -44,9 +44,17 @@ echo -n "$1" > /var/ipfire/red/iface
 echo -n "$4" > /var/ipfire/red/local-ipaddress
 echo -n "$5" > /var/ipfire/red/remote-ipaddress
 grep -v "gateway" /etc/hosts > /tmp/hosts
-echo "$5 gateway"  >> /tmp/hosts
-mv /tmp/hosts /etc/hosts
 
+TEST=`ping -c 2 $5 2>/dev/null | tail -2 | head -1 | cut -d"," -f2`;
+
+if [ "$TEST" == " 2 packets received" ]; then
+       echo "$5 gateway" >> /tmp/hosts
+else
+       FIRE=`nslookup ping.ipfire.org | tail -2  | head -1 | cut -d" " -f2`;
+       echo "$FIRE gateway" >> /tmp/hosts
+fi
+
+mv /tmp/hosts /etc/hosts
 touch /var/ipfire/red/active
 
 run_subdir ${rc_base}/init.d/networking/red.up/