/[smeserver]/rpms/e-smith-nutUPS/sme9/e-smith-nutUPS-2.4.0.Listen_Local_Network.patch
ViewVC logotype

Diff of /rpms/e-smith-nutUPS/sme9/e-smith-nutUPS-2.4.0.Listen_Local_Network.patch

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

Revision 1.2 by stephdl, Thu Jan 22 10:29:09 2015 UTC Revision 1.3 by stephdl, Sun Jan 25 16:53:38 2015 UTC
# Line 1  Line 1 
1    diff -Nur e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/db/configuration/defaults/nut/access e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/db/configuration/defaults/nut/access
2    --- e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/db/configuration/defaults/nut/access  1970-01-01 01:00:00.000000000 +0100
3    +++ e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/db/configuration/defaults/nut/access   2015-01-24 10:12:37.561073849 +0100
4    @@ -0,0 +1 @@
5    +localhost
6  diff -Nur e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/hosts.allow/upsd e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/hosts.allow/upsd  diff -Nur e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/hosts.allow/upsd e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/hosts.allow/upsd
7  --- e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/hosts.allow/upsd        1970-01-01 01:00:00.000000000 +0100  --- e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/hosts.allow/upsd        1970-01-01 01:00:00.000000000 +0100
8  +++ e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/hosts.allow/upsd 2015-01-22 10:38:53.743336465 +0100  +++ e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/hosts.allow/upsd 2015-01-24 11:37:13.744722139 +0100
9  @@ -0,0 +1,3 @@  @@ -0,0 +1,14 @@
10  +{  +{
11  +       $DB->hosts_allow_spec('nut','nut');  +    use esmith::ConfigDB;
12    +    my $db = esmith::ConfigDB->open_ro or die ("Unable to open the configuration database");
13    +    my $access = $db->get_prop('nut','access')||'localhost';
14    +
15    +    if ($access ne 'public')
16    +    {
17    +        $DB->hosts_allow_spec('nut','nut');
18    +    }
19    +    else
20    +    {
21    +        $OUT .= "# 'nut' can not be opened outside of your local network";
22    +    }
23  +}  +}
24  diff -Nur e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/services/30Nut e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/services/30Nut  diff -Nur e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/services/30Nut e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/services/30Nut
25  --- e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/services/30Nut  1970-01-01 01:00:00.000000000 +0100  --- e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/services/30Nut  1970-01-01 01:00:00.000000000 +0100
# Line 14  diff -Nur e-smith-nutUPS-2.4.0.old8793/r Line 30  diff -Nur e-smith-nutUPS-2.4.0.old8793/r
30  +nut              3493/udp                       # Network UPS Tools  +nut              3493/udp                       # Network UPS Tools
31  diff -Nur e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/ups/upsd.conf/10Listen_Local_Network e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/ups/upsd.conf/10Listen_Local_Network  diff -Nur e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/ups/upsd.conf/10Listen_Local_Network e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/ups/upsd.conf/10Listen_Local_Network
32  --- e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/ups/upsd.conf/10Listen_Local_Network    1970-01-01 01:00:00.000000000 +0100  --- e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/ups/upsd.conf/10Listen_Local_Network    1970-01-01 01:00:00.000000000 +0100
33  +++ e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/ups/upsd.conf/10Listen_Local_Network     2015-01-22 11:14:27.995311819 +0100  +++ e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/ups/upsd.conf/10Listen_Local_Network     2015-01-24 10:47:33.993398580 +0100
34  @@ -0,0 +1,2 @@  @@ -0,0 +1,10 @@
35  +LISTEN 127.0.0.1  +{
36  +LISTEN {$LocalIP}  +use esmith::ConfigDB;
37    +my $db = esmith::ConfigDB->open_ro or die ("Unable to open configuration database");
38    +
39    +my $localip = $db->get_value("LocalIP") || '';
40    +my $access  = $db->get_prop("nut","access") || 'localhost';
41    +
42    +$OUT .= "LISTEN 127.0.0.1";
43    +$OUT .= "\nLISTEN $localip" if ($access eq 'private');
44    +}
45  diff -Nur e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/ups/upsd.conf/20ACL e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/ups/upsd.conf/20ACL  diff -Nur e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/ups/upsd.conf/20ACL e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/ups/upsd.conf/20ACL
46  --- e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/ups/upsd.conf/20ACL     2015-01-22 08:59:03.647593780 +0100  --- e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/ups/upsd.conf/20ACL     2015-01-22 08:59:03.647593780 +0100
47  +++ e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/ups/upsd.conf/20ACL      1970-01-01 01:00:00.000000000 +0100  +++ e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/ups/upsd.conf/20ACL      1970-01-01 01:00:00.000000000 +0100


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

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