]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/index.cgi
Firewallhitgraphs gefixt.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / index.cgi
index 6e85043ca4c32ab97be57394025e8cae66946ce6..c984300e48ec57a97b81376c2510bb655fd1ab09 100644 (file)
@@ -10,8 +10,8 @@
 use strict;
 
 # enable only the following on debugging purpose
-#use warnings;
-#use CGI::Carp 'fatalsToBrowser';
+use warnings;
+use CGI::Carp 'fatalsToBrowser';
 
 require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
@@ -74,7 +74,7 @@ if ( ( $pppsettings{'VALID'} eq 'yes' && $modemsettings{'VALID'} eq 'yes' ) || (
            chomp ($ipaddr);
        }
        if (open(IPADDR,"${General::swroot}/red/local-ipaddress")) {
-           my $ipaddr = <IPADDR>;
+           $ipaddr = <IPADDR>;
            close IPADDR;
            chomp ($ipaddr);
        }
@@ -136,6 +136,21 @@ END
        print "$Lang::tr{'profile has errors'}\n </b></font>\n";
        }
 
+       my $HOSTNAME = (gethostbyaddr(pack("C4", split(/\./, $ipaddr)), 2))[0];
+       if ( "$HOSTNAME" ne "" ) {
+               print <<END;
+       <tr><td><b>Hostname:</b><td>$HOSTNAME<td>&nbsp;
+END
+       }
+
+       if ( -e "/var/ipfire/red/remote-ipaddress" ) {
+               my $GATEWAY = `cat /var/ipfire/red/remote-ipaddress`;
+               chomp($GATEWAY);
+               print <<END;
+       <tr><td><b>Gateway:</b><td>$GATEWAY<td>&nbsp;
+END
+       }
+
        my $DNS1 = `cat /var/ipfire/red/dns1`;
        my $DNS2 = `cat /var/ipfire/red/dns2`;
        chomp($DNS1);