X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Findex.cgi;h=8e7207d0c97d25b655a1576b75f94dff8d6e84df;hb=fa8edb9bd7c2bf275b19f8e8b6be8cf43ae189f0;hp=eafbdb1376b0b921fe36ebf61970fcf3bd0c7922;hpb=851a984121f4a20d646de229c7901258fe5605d2;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index eafbdb1376..8e7207d0c9 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -200,30 +200,46 @@ END END } - my @dns_servers = (); - foreach my $f ("${General::swroot}/red/dns1", "${General::swroot}/red/dns2") { - open(DNS, "<$f"); - my $dns_server = ; - close(DNS); - - chomp($dns_server); - if ($dns_server) { - push(@dns_servers, $dns_server); - } + if (&General::RedIsWireless()) { + my $iface = $netsettings{"RED_DEV"} || "red0"; + + my $essid = &Network::wifi_get_essid($iface); + my $frequency = &Network::wifi_get_frequency($iface); + my $access_point = &Network::wifi_get_access_point($iface); + my $bit_rate = &Network::wifi_get_bit_rate($iface); + my $link_quality = &Network::wifi_get_link_quality($iface); + my $signal_level = &Network::wifi_get_signal_level($iface); + + print < + + $Lang::tr{'wireless network'}: + + + $essid + + + $access_point @ $frequency + + + + + + $Lang::tr{'uplink bit rate'}: + + + + $bit_rate + + + $link_quality% @ $signal_level + + +END } - my $dns_servers_str = join(", ", @dns_servers); print < - - $Lang::tr{'dns servers'}: - - - $dns_servers_str - - - - + END #Dial profiles @@ -332,13 +348,12 @@ END } #check if IPSEC is running if ( $vpnsettings{'ENABLED'} eq 'on' || $vpnsettings{'ENABLED_BLUE'} eq 'on' ) { - my $ipsecip = $vpnsettings{'VPN_IP'}; print< $Lang::tr{'ipsec'} - $ipsecip + Online END @@ -409,9 +424,16 @@ END foreach my $key (sort { uc($vpnconfig{$a}[1]) cmp uc($vpnconfig{$b}[1]) } keys %vpnconfig) { if ($vpnconfig{$key}[0] eq 'on' && $vpnconfig{$key}[3] ne 'host') { $count++; - my ($vpnip,$vpnsub) = split("/",$vpnconfig{$key}[11]); - $vpnsub=&General::iporsubtocidr($vpnsub); - $vpnip="$vpnip/$vpnsub"; + + my @n = (); + + my @networks = split(/\|/, $vpnconfig{$key}[11]); + foreach my $network (@networks) { + my ($vpnip, $vpnsub) = split("/", $network); + $vpnsub = &Network::convert_netmask2prefix($vpnsub) || $vpnsub; + push(@n, "$vpnip/$vpnsub"); + } + if ($count % 2){ $col = $color{'color22'}; }else{ @@ -419,10 +441,14 @@ END } print ""; print "$vpnconfig{$key}[1]"; - print "$vpnip"; + print "" . join("
", @n) . ""; my $activecolor = $Header::colourred; my $activestatus = $Lang::tr{'capsclosed'}; + if ($vpnconfig{$key}[33] eq "add") { + $activecolor = ${Header::colourorange}; + $activestatus = $Lang::tr{'vpn wait'}; + } if ($vpnconfig{$key}[0] eq 'off') { $activecolor = $Header::colourblue; $activestatus = $Lang::tr{'capsclosed'}; @@ -431,6 +457,12 @@ END if (($line =~ /\"$vpnconfig{$key}[1]\".*IPsec SA established/) || ($line =~/$vpnconfig{$key}[1]\{.*INSTALLED/ )){ $activecolor = $Header::colourgreen; $activestatus = $Lang::tr{'capsopen'}; + } elsif ($line =~ /$vpnconfig{$key}[1]\[.*CONNECTING/) { + $activecolor = $Header::colourorange; + $activestatus = $Lang::tr{'vpn connecting'}; + } elsif ($line =~ /$vpnconfig{$key}[1]\{.*ROUTED/) { + $activecolor = $Header::colourorange; + $activestatus = $Lang::tr{'vpn on-demand'}; } } } @@ -503,11 +535,22 @@ END &Header::closebox(); } +my $dnssec_status = &General::dnssec_status(); +if ($dnssec_status eq "off") { + $warnmessage .= "
  • $Lang::tr{'dnssec disabled warning'}
  • "; +} + # Fireinfo if ( ! -e "/var/ipfire/main/send_profile") { $warnmessage .= "
  • $Lang::tr{'fireinfo please enable'}
  • "; } +# Legacy architecture +my ($sysname, $nodename, $release, $version, $machine) = &POSIX::uname(); +if ($machine =~ m/^i?86$/) { + $warnmessage .= "
  • $Lang::tr{'legacy architecture warning'}
  • "; +} + # Memory usage warning my @free = `/usr/bin/free`; $free[1] =~ m/(\d+)/; @@ -556,13 +599,6 @@ foreach my $file (@files) { } } -# Reiser4 warning -my @files = `mount | grep " reiser4 (" 2>/dev/null`; -foreach my $disk (@files) { - chomp ($disk); - $warnmessage .= "
  • $disk - $Lang::tr{'deprecated fs warn'}
  • "; -} - if ($warnmessage) { &Header::openbox('100%','center', ); print "";