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 brackets.
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 parser. 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. Jim On Tue, Apr 5, 2022, 16:32 Roger Price <[email protected]> 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" ? > > Roger_______________________________________________ > Nut-upsuser mailing list > [email protected] > https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser >
_______________________________________________ Nut-upsuser mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser
