[Nut-upsuser] Formal definition of a UPS name
jimklimov+nut at gmail.com
Tue Apr 5 16:00:44 BST 2022
Did not find a definition in the docs quickly...
I think Arnaud mentioned that there was (planned to be?) some constraint,
but looking at the parsing code it seems that de-facto we check for (and
strip away) the opening and closing brackets in the first token after
`parseconf` separated the lines into those, and take octets between the
So at least parseconf rules out whitespace and some punctuation... unless
someone double-quotes a section line/content?.. :)
Device section names are also used as socket filenames (so no slash).
Empty is probably also bad, though does not seem immediately invalid in the
Most of the processing then deals with C string equality.
The nut-driver-enumerator and upsdrvsvcctl scripts in new release also
check if the device name contains valid characters for a nut-driver service
instance name (different charsets and lengths for systemd, SMF) but work
around by hashing it if not.
Similar logic applies for user names (as sections in upsd.users), it seems.
On Tue, Apr 5, 2022, 16:32 Roger Price <roger at rogerprice.org> wrote:
> On Tue, 5 Apr 2022, Roger Price wrote:
> >> Do we have a formal definition of a UPS name?
> Should a system administrator be able to name a UPS "Bébé" or "罗杰-1" ?
> Nut-upsuser mailing list
> Nut-upsuser at alioth-lists.debian.net
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Nut-upsuser