Multiple CGI files: Check if BLUE or ORANGE are actually configured.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Sep 2013 14:38:23 +0000 (16:38 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 7 Sep 2013 14:40:59 +0000 (16:40 +0200)
config/rootfiles/core/fifteen/filelists/files
html/cgi-bin/netinternal.cgi
html/cgi-bin/proxy.cgi
html/cgi-bin/vpnmain.cgi

index 1ed4113d5a22ce7bb14aab5a10c3401e9aa11b24..b97812d1d2f258212f361aa87163e48ac4963ab7 100644 (file)
@@ -2,7 +2,9 @@ etc/system-release
 etc/issue
 etc/rc.d/init.d/network
 srv/web/ipfire/cgi-bin/index.cgi
+srv/web/ipfire/cgi-bin/netinternal.cgi
 srv/web/ipfire/cgi-bin/ovpnmain.cgi
+srv/web/ipfire/cgi-bin/proxy.cgi
 srv/web/ipfire/cgi-bin/upnp.cgi
 srv/web/ipfire/cgi-bin/speed.cgi
 srv/web/ipfire/cgi-bin/vpnmain.cgi
index 60560f3d4c4e4a06ad395f5ac98db2b360c6d079..3f2fb56cced87df699dffc9b27b8118eb8ad3a06 100644 (file)
@@ -61,8 +61,8 @@ if ( $querry[0] =~ /wireless/ ){
        &Header::openbigbox('100%', 'left');
 
        push (@graphs, ($netsettings{'GREEN_DEV'}));
-       if ($netsettings{'BLUE_DEV'}) {push (@graphs, ($netsettings{'BLUE_DEV'})); }
-       if ($netsettings{'ORANGE_DEV'}) {push (@graphs, ($netsettings{'ORANGE_DEV'})); }
+       if (&Header::blue_used() && $netsettings{'BLUE_DEV'}) {push (@graphs, ($netsettings{'BLUE_DEV'})); }
+       if (&Header::orange_used() && $netsettings{'ORANGE_DEV'}) {push (@graphs, ($netsettings{'ORANGE_DEV'})); }
 
        my @wirelessgraphs = `ls -dA /var/log/rrd/collectd/localhost/wireless* 2>/dev/null`;
        foreach (@wirelessgraphs){
index bcdc2024f574e71a2f383b9f746393f237f1eacf..97e752e28d202a8e6f7d3098396f7ff0c3502e77 100644 (file)
@@ -180,8 +180,8 @@ close(FILE);
 &General::readhash("${General::swroot}/main/settings", \%mainsettings);
 
 my $green_cidr = &General::ipcidr("$netsettings{'GREEN_NETADDRESS'}\/$netsettings{'GREEN_NETMASK'}");
-my $blue_cidr = "# Blue not defined";
-if ($netsettings{'BLUE_DEV'}) {
+my $blue_cidr = "";
+if (&Header::blue_used() && $netsettings{'BLUE_DEV'}) {
        $blue_cidr = &General::ipcidr("$netsettings{'BLUE_NETADDRESS'}\/$netsettings{'BLUE_NETMASK'}");
 }
 
index 2fbe48035a5fab51c64a24fbe84c5021640467b4..2d9058d0523dad099fbd079565a4d06799f2ff9b 100644 (file)
@@ -61,11 +61,11 @@ my %mainsettings = ();
 
 my $green_cidr = &General::ipcidr("$netsettings{'GREEN_NETADDRESS'}/$netsettings{'GREEN_NETMASK'}");
 my $blue_cidr = "# Blue not defined";
-if ($netsettings{'BLUE_DEV'}) {
+if (&Header::blue_used() && $netsettings{'BLUE_DEV'}) {
        $blue_cidr = &General::ipcidr("$netsettings{'BLUE_NETADDRESS'}/$netsettings{'BLUE_NETMASK'}");
 }
 my $orange_cidr = "# Orange not defined";
-if ($netsettings{'ORANGE_DEV'}) {
+if (&Header::orange_used() && $netsettings{'ORANGE_DEV'}) {
        $orange_cidr = &General::ipcidr("$netsettings{'ORANGE_NETADDRESS'}/$netsettings{'ORANGE_NETMASK'}");
 }