[Nut-upsdev] RFE to extend "LISTEN" directive to support host-colon-port (as single token)

Jim Klimov jimklimov at gmail.com
Mon Apr 29 11:39:41 BST 2024


Cheers all,

  A recent discussion in the issue tracker brought up the idea to allow the
`LISTEN` keyword to also accept a single "host:port" token (e.g. if there
is only one argument, with at least one colon, and the last colon is
followed only by numbers, split it into host and port) :
https://github.com/networkupstools/nut/issues/2424

  I see certain pros to the idea (may be more simple to use and consistent
with some other software setup), although I don't think it was an issue
ever brought up in discussions before.

  There are also certain cons, primarily about parsing such stuff reliably
and consistently in different code bases (now also with augeas and nutconf
to worry about). The actual "production" parsing in NUT data server code
should be trivial.

  On a somewhat related note, should the port part be constrained to
numbers, or should it also pass through the naming database (resolve via
typically /etc/services on POSIX systems) if it is a non-numeric string,
similar to how we resolve host names into IP address numbers?

  What would the community say, is any of this worth spending time on?
Would anyone volunteer to roll up the sleeves for that? :)

Jim Klimov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/nut-upsdev/attachments/20240429/1e27f34c/attachment.htm>


More information about the Nut-upsdev mailing list