Charles Lepple
2007-Mar-12 02:55 UTC
[Nut-upsdev] Request for comments/testing: upsc_list branch
I finally got some time to implement a pair of options to upsc for listing all configured UPSes on a given upsd: http://boxster.ghz.cc/projects/nut/changeset?new=branches%2Fupsc_list%2Fclients%2Fupsc.c%40859&old=trunk%2Fclients%2Fupsc.c%40821 http://boxster.ghz.cc/projects/nut/browser/branches/upsc_list/clients/upsc.c?rev=859 I think this should work with the new functions for parsing IPv6 addresses, but I haven't set up any IPv6 hosts yet. I will fix the man page if there is consensus that this is the way to implement this functionality. For now, just run "upsc" without any arguments, and check the second syntax in the usage message. Let me know how it works for you. -- - Charles Lepple
Charles Lepple
2007-Mar-12 15:24 UTC
[Nut-upsdev] Request for comments/testing: upsc_list branch
On 3/12/07, Arnaud Quette <aquette.dev@gmail.com> wrote:> you should just complete the help msg for the 2nd form to mention that > hostname is also optional, and defaults to localhost if omitted. along > with the manpage update.Sounds good. I will finish the man page tonight. Actually, I think I might reverse the order of the two syntaxes in help() (and the man page), since it makes more sense to me to list UPSes on a host first, then list variables on an UPS. That's the order that a script writer would be using the different syntaxes, anyway. -- - Charles Lepple
Arnaud Quette
2007-Mar-12 15:40 UTC
[Nut-upsdev] Request for comments/testing: upsc_list branch
2007/3/12, Charles Lepple <clepple@gmail.com>:> I finally got some time to implement a pair of options to upsc for > listing all configured UPSes on a given upsd: > > http://boxster.ghz.cc/projects/nut/changeset?new=branches%2Fupsc_list%2Fclients%2Fupsc.c%40859&old=trunk%2Fclients%2Fupsc.c%40821 > > http://boxster.ghz.cc/projects/nut/browser/branches/upsc_list/clients/upsc.c?rev=859 > > I think this should work with the new functions for parsing IPv6 > addresses, but I haven't set up any IPv6 hosts yet. > > I will fix the man page if there is consensus that this is the way to > implement this functionality. For now, just run "upsc" without any > arguments, and check the second syntax in the usage message. > > Let me know how it works for you.nice, this fixes a good bunch of upsc lacks. you should just complete the help msg for the 2nd form to mention that hostname is also optional, and defaults to localhost if omitted. along with the manpage update. Arnaud -- Linux / Unix Expert - MGE UPS SYSTEMS - R&D Dpt Network UPS Tools (NUT) Project Leader - http://www.networkupstools.org/ Debian Developer - http://people.debian.org/~aquette/ OpenSource Developer - http://arnaud.quette.free.fr/