/[smecontribs]/rpms/smeserver-awstats/contribs9/smeserver-awstats-1.3.bz8450.remove_ExternalIP-LocalIP.patch
ViewVC logotype

Annotation of /rpms/smeserver-awstats/contribs9/smeserver-awstats-1.3.bz8450.remove_ExternalIP-LocalIP.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Sep 7 14:39:47 2015 UTC (9 years, 1 month ago) by stephdl
Branch: MAIN
CVS Tags: smeserver-awstats-1_3-2_el6_sme
* Mon Sep 7 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.3-2.sme
- added smeserver-awstats-1.3.bz8450.remove_ExternalIP-LocalIP.patch
- removed ExternalIP_LocalIP_ExternalNetmask [SME: 8450]

1 stephdl 1.1 diff -Nur smeserver-awstats-1.3.bz8450.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf smeserver-awstats-1.3.bz8450.new/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf
2     --- smeserver-awstats-1.3.bz8450.old/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf 2015-09-07 16:08:30.342801430 +0200
3     +++ smeserver-awstats-1.3.bz8450.new/root/etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf 2015-09-07 16:28:01.301311084 +0200
4     @@ -178,18 +178,27 @@
5    
6     # local IP
7     #
8     + my $localip = $InternalInterface{'IPAddress'};
9     + my $localnetmask = $InternalInterface{'Netmask'};
10     +
11     $ipskip=db_get_prop(\%services, "AWStats", "SkipLocalIP");
12     if (defined $ipskip && $ipskip ne "no") { # in Beta1 SkipLocalIP="mask" was possible
13     - $OUT .= mip($LocalIP,$LocalNetmask) . " ";
14     + $OUT .= mip($localip,$localnetmask) . " ";
15     }
16    
17     # external IP
18     #
19     + my $externalstatus = $ExternalInterface{'status'} || 'disabled';
20     + my $externalip = $ExternalInterface{'IPAddress'} || '';
21     + my $externalnetmask = $ExternalInterface{'Netmask'} || '';
22     +
23     + if ($externalstatus eq 'enabled') {
24     +
25     $ipskip=db_get_prop(\%services, "AWStats", "SkipExternalIP");
26     if (defined $ipskip && $ipskip eq "mask") {
27     - $OUT .= mip($ExternalIP, $ExternalNetmask) . " ";
28     + $OUT .= mip($externalip, $externalnetmask) . " ";
29     } elsif (defined $ipskip && $ipskip eq "yes") {
30     - $OUT .= "$ExternalIP ";
31     + $OUT .= "$externalip ";
32     }
33     $OUT .="127.0.0.1";
34     $OUT =~ s/\./\\./g;
35     @@ -212,12 +221,12 @@
36     }
37     # needed for IE6 beta
38     if (defined $ipskip && $ipskip eq "mask") {
39     - $ExternalIP = mip($ExternalIP, $ExternalNetmask);
40     - $ExternalIP =~ s/\./\\./g;
41     - $OUT .= " " . $ExternalIP;
42     + $externalip = mip($externalip, $externalnetmask);
43     + $externalip =~ s/\./\\./g;
44     + $OUT .= " " . $externalip;
45     } elsif (defined $ipskip && $ipskip eq "yes") {
46     - $ExternalIP =~ s/\./\\./g;
47     - $OUT .= " " . $ExternalIP;
48     + $externalip =~ s/\./\\./g;
49     + $OUT .= " " . $externalip;
50     }
51    
52     $OUT .= '"' . "\n";
53     @@ -242,7 +251,8 @@
54     return $ip;
55     }
56     }
57     -
58     +else {$OUT .= "\n The server is in server-only mode";}
59     +}
60     # Do not include access to URLs that match following entries.
61     # If you don't want to include users homepage in your stats, add "/~".
62     # You can also, if you want, add list of not important frame pages (like

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed