ipsec: change status display in cgi's for charon.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 26 Jun 2011 13:16:32 +0000 (15:16 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 26 Jun 2011 13:16:32 +0000 (15:16 +0200)
config/rootfiles/core/next/filelists/files
html/cgi-bin/index.cgi
html/cgi-bin/vpnmain.cgi

index e3580d4..18df107 100644 (file)
@@ -1,9 +1,11 @@
 etc/system-release
 etc/issue
 srv/web/ipfire/cgi-bin/extrahd.cgi
+srv/web/ipfire/cgi-bin/index.cgi
 srv/web/ipfire/cgi-bin/vpnmain.cgi
 var/ipfire/langs/de.pl
 var/ipfire/langs/en.pl
 var/ipfire/langs/es.pl
 var/ipfire/langs/fr.pl
+usr/local/bin/ipsecctrl
 usr/local/bin/vpn-watch
index 0dcadb0..32ae7ff 100644 (file)
@@ -369,7 +369,9 @@ END
                            $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourblue}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b></td></tr></table>";
                        } else {
                            foreach my $line (@status) {
-                               if ($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) {
+                               if (($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) ||
+                                   ($line =~/ $confighash{$key}[1]\[.*ESTABLISHED/ ))
+                                   {
                                    $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourgreen}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsopen'}</font></b></td></tr></table>";
                                }
                           }
index 39bbbec..c412480 100644 (file)
@@ -2539,7 +2539,9 @@ END
        # get real state
        my $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourred}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsclosed'}</font></b></td></tr></table>";
        foreach my $line (@status) {
-           if ($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) {
+           if ($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) ||
+              ($line =~ / $confighash{$key}[1]\[.*ESTABLISHED/))
+           {
                $active = "<table cellpadding='2' cellspacing='0' bgcolor='${Header::colourgreen}' width='100%'><tr><td align='center'><b><font color='#FFFFFF'>$Lang::tr{'capsopen'}</font></b></td></tr></table>";
            }
        }