]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/index.cgi
HinzugefĆ¼gt:
[ipfire-2.x.git] / html / cgi-bin / index.cgi
index 7bcf44522450266a16566cc33fc187249692989f..8d7af10c49e006ffc01111258b1688b4929a00e8 100644 (file)
@@ -67,21 +67,17 @@ my $dialButtonDisabled = "disabled='disabled'";
 &Header::openbigbox('', 'center');
 &Header::openbox('100%', 'center', &Header::cleanhtml(`/bin/uname -n`,"y"));
 
-if ( ( $pppsettings{'VALID'} eq 'yes'&& $modemsettings{'VALID'} eq 'yes' ) || ( $netsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ && $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ )) {
-       if ($connstate =~ /$Lang::tr{'connected'}/) {
-           if ($ddnssettings{'BEHINDROUTER'} eq 'FETCH_IP') {
-               if (open(IPADDR,"${General::swroot}/ddns/ipcache")) {
-                   $ipaddr = <IPADDR>;
-                   close IPADDR;
-                   chomp ($ipaddr);
-               }
-           }
-           if (open(IPADDR,"${General::swroot}/red/local-ipaddress")) {
-               my $ipaddr = <IPADDR>;
-               close IPADDR;
-               chomp ($ipaddr);
-           }
-        }
+if ( ( $pppsettings{'VALID'} eq 'yes' && $modemsettings{'VALID'} eq 'yes' ) || ( $netsettings{'CONFIG_TYPE'} =~ /^(2|3|6|7)$/ && $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ )) {
+       if (open(IPADDR,"${General::swroot}/ddns/ipcache")) {
+           $ipaddr = <IPADDR>;
+           close IPADDR;
+           chomp ($ipaddr);
+       }
+       if (open(IPADDR,"${General::swroot}/red/local-ipaddress")) {
+           my $ipaddr = <IPADDR>;
+           close IPADDR;
+           chomp ($ipaddr);
+       }
 } elsif ($modemsettings{'VALID'} eq 'no') {
        print "$Lang::tr{'modem settings have errors'}\n </b></font>\n";
 } else {
@@ -102,13 +98,12 @@ print <<END;
 
 <!-- Table of networks -->
 <table border='0' width=80%>
-  <!--  Headline -->
   <tr> <th bgcolor='lightgrey'>$Lang::tr{'network'}
        <th bgcolor='lightgrey'>IP
        <th bgcolor='lightgrey'>$Lang::tr{'status'}
-  <!-- RED -->
   <tr> <td bgcolor='$Header::colourred' width='25%'><font size='2' color='white'><b>$Lang::tr{'internet'}:</b></font><br>
-       <td width='30%'>$ipaddr <td width='45%'>$connstate
+       <td width='30%'>$ipaddr 
+       <td width='45%'>$connstate
        <tr><td colspan='2'>
                <form method='post' action='/cgi-bin/dial.cgi'>$Lang::tr{'profile'}:
                        <select name='PROFILE'>
@@ -161,13 +156,14 @@ END
                        if ( `cat /var/ipfire/proxy/advanced/settings | grep ^TRANSPARENT_BLUE=on` ) { print " (transparent)"; }
                }       else { print "Proxy aus"; }
        }
-       if (`ifconfig | grep $netsettings{'ORANGE_DEV'}`) { print <<END;
+       if ( $netsettings{'ORANGE_DEV'} ) { print <<END;
                <tr><td bgcolor='$Header::colourorange' width='25%'><font size='2' color='white'><b>$Lang::tr{'dmz'}:</b></font><br>
                <td width='30%'>$netsettings{'ORANGE_ADDRESS'}
                <td width='45%'><font color=$Header::colourgreen>Online</font>
 END
        }
-       if ( `cat /var/ipfire/vpn/settings | grep ^ENABLED=on` ) { 
+       if ( `cat /var/ipfire/vpn/settings | grep ^ENABLED=on` ||
+            `cat /var/ipfire/vpn/settings | grep ^ENABLED_BLUE=on` ) { 
                my $ipsecip = `cat /var/ipfire/vpn/settings | grep ^VPN_IP= | cut -c 8-`;
                print <<END;
                <tr><td bgcolor='$Header::colourvpn' width='25%'><font size='2' color='white'><b>$Lang::tr{'vpn'}:</b></font><br>