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 09:18:14.317537036 +0100 |
+++ e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/hosts.allow/upsd 2015-01-25 23:20:13.356915837 +0100 |
9 |
@@ -0,0 +1,3 @@ |
@@ -0,0 +1,3 @@ |
10 |
+{ |
+{ |
11 |
+ $DB->hosts_allow_spec('nut','upsd'); |
+ $DB->hosts_allow_spec('nut','nut'); |
12 |
+} |
+} |
13 |
|
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 |
14 |
|
--- e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/services/30Nut 1970-01-01 01:00:00.000000000 +0100 |
15 |
|
+++ e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/services/30Nut 2015-01-22 11:15:15.714961712 +0100 |
16 |
|
@@ -0,0 +1,3 @@ |
17 |
|
+#Nut Service |
18 |
|
+nut 3493/tcp # Network UPS Tools |
19 |
|
+nut 3493/udp # Network UPS Tools |
20 |
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 |
21 |
--- 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 |
22 |
+++ e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/ups/upsd.conf/10Listen_Local_Network 2015-01-22 09:32:12.197591624 +0100 |
+++ e-smith-nutUPS-2.4.0.bz8793/root/etc/e-smith/templates/etc/ups/upsd.conf/10Listen_Local_Network 2015-01-25 23:19:27.179391036 +0100 |
23 |
@@ -0,0 +1,26 @@ |
@@ -0,0 +1,6 @@ |
24 |
+{ |
+{ |
25 |
+ use strict; |
+my $access = $nut{access} || 'localhost'; |
|
+ use warnings; |
|
|
+ use esmith::ConfigDB; |
|
|
+ use Net::IPv4Addr qw( ipv4_broadcast ipv4_parse ); |
|
|
+ use Net::IP; |
|
|
+ |
|
|
+ #Variable declaration |
|
|
+ my $config = esmith::ConfigDB->open_ro || die ("Unable to open the configuration database"); |
|
|
+ my $network = $config->get_prop('InternalInterface','Network'); |
|
|
+ my $netmask = $config->get_prop('InternalInterface','Netmask'); |
|
|
+ my $ipaddress = $config->get_prop('InternalInterface','IPAddress'); |
|
|
+ |
|
|
+ my $network_cidr = ipv4_parse($network,$netmask); |
|
|
+ my $broadcast = ipv4_broadcast($network,$netmask); |
|
|
+ my $ip = new Net::IP ("$network_cidr") || die ("Unable to generate the list of UPS Listen IP"); |
|
26 |
+ |
+ |
27 |
+ #Allow the localhost |
+$OUT .= "LISTEN 127.0.0.1"; |
28 |
+ $OUT .= "LISTEN 127.0.0.1\n"; |
+$OUT .= "\nLISTEN $LocalIP" if ($access eq 'private'); |
|
+ # Loop to display all IP |
|
|
+ do { |
|
|
+ my $display = $ip->ip(); |
|
|
+ #we want to remove the network, the server IP and the brodcast IP |
|
|
+ $OUT .= "LISTEN $display\n" if (($display ne $network)&&($display ne $broadcast)&&($display ne $ipaddress)); |
|
|
+ } while (++$ip); |
|
29 |
+} |
+} |
30 |
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 |
31 |
--- 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 |