Enhancement #2139

NUT: upsd daemon should listen on 0.0.0.0

Added by Giacomo Sanchietti almost 8 years ago. Updated almost 8 years ago.

Status:CLOSEDStart date:
Priority:NormalDue date:
Assignee:-% Done:

100%

Category:nethserver-nut
Target version:v6.4-beta2
Resolution: NEEDINFO:No

Description

Like any other daemon, upsd should listen on 0.0.0.0.
With this configuration, the service will be always accessible regardless of system IP changes.

Tested patch:

--- /etc/e-smith/templates/etc/ups/upsd.conf/20listen    2013-07-23 16:18:41.000000000 +0200
+++ /etc/e-smith/templates-custom/etc/ups/upsd.conf/20listen    2013-08-28 17:05:26.394832151 +0200
@@ -1,13 +1 @@
-{
-    use esmith::NetworksDB;
-
-    my $greenInterface = esmith::NetworksDB->open_ro()->green();
-    if($greenInterface) {
-        $LocalIP = $greenInterface->prop('ipaddr');
-    } else {
-        $LocalIP = '127.0.0.1';
-    }
-    $OUT.="LISTEN $LocalIP";
-
-}
-LISTEN 127.0.0.1
+LISTEN 0.0.0.0

Associated revisions

Revision f8b629b9
Added by Giacomo Sanchietti almost 8 years ago

upsd.conf template: always listen on 0.0.0.0. Refs #2139

History

#1 Updated by Giacomo Sanchietti almost 8 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20

#2 Updated by Giacomo Sanchietti almost 8 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#3 Updated by Giacomo Sanchietti almost 8 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

#4 Updated by Giacomo Sanchietti almost 8 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
New package in nethserver-testing:
  • nethserver-nut-1.0.4-2.0gitf8b629b9.ns6.noarch.rpm

Test case
Just check upsd daemon is listening on 0.0.0.0.

Eg:

[root@test ~]# netstat -lnp | grep upsd
tcp        0      0 0.0.0.0:3493                0.0.0.0:*                   LISTEN      11935/upsd 

#5 Updated by Davide Principi almost 8 years ago

  • Assignee set to Davide Principi

#6 Updated by Davide Principi almost 8 years ago

  • Status changed from ON_QA to VERIFIED
  • Assignee deleted (Davide Principi)
  • % Done changed from 70 to 90

VERIFIED

#7 Updated by Giacomo Sanchietti almost 8 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100
In nethserver-updates:
  • nethserver-nut-1.0.5-1.ns6.noarch.rpm

Also available in: Atom PDF