#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) {
};
$dhcpsettings{'SORT_LEASELIST'}=$newsort;
- &writehash("${swroot}/dhcp/settings", \%dhcpsettings);
+ &General::writehash("${swroot}/dhcp/settings", \%dhcpsettings);
$dhcpsettings{'ACTION'} = 'SORT'; # avoid the next test "First lauch"
}
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
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/