5 |
+localhost |
+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-24 11:37:13.744722139 +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,14 @@ |
@@ -0,0 +1,3 @@ |
10 |
+{ |
+{ |
|
+ use esmith::ConfigDB; |
|
|
+ my $db = esmith::ConfigDB->open_ro or die ("Unable to open the configuration database"); |
|
|
+ my $access = $db->get_prop('nut','access')||'localhost'; |
|
|
+ |
|
|
+ if ($access ne 'public') |
|
|
+ { |
|
11 |
+ $DB->hosts_allow_spec('nut','nut'); |
+ $DB->hosts_allow_spec('nut','nut'); |
|
+ } |
|
|
+ else |
|
|
+ { |
|
|
+ $OUT .= "# 'nut' can not be opened outside of your local network"; |
|
|
+ } |
|
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 |
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 |
--- e-smith-nutUPS-2.4.0.old8793/root/etc/e-smith/templates/etc/services/30Nut 1970-01-01 01:00:00.000000000 +0100 |
19 |
+nut 3493/udp # Network UPS Tools |
+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-24 10:47:33.993398580 +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,10 @@ |
@@ -0,0 +1,6 @@ |
24 |
+{ |
+{ |
25 |
+use esmith::ConfigDB; |
+my $access = $nut{access} || 'localhost'; |
|
+my $db = esmith::ConfigDB->open_ro or die ("Unable to open configuration database"); |
|
|
+ |
|
|
+my $localip = $db->get_value("LocalIP") || ''; |
|
|
+my $access = $db->get_prop("nut","access") || 'localhost'; |
|
26 |
+ |
+ |
27 |
+$OUT .= "LISTEN 127.0.0.1"; |
+$OUT .= "LISTEN 127.0.0.1"; |
28 |
+$OUT .= "\nLISTEN $localip" if ($access eq 'private'); |
+$OUT .= "\nLISTEN $LocalIP" if ($access eq 'private'); |
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 |