Comment 9 for bug 222761

Revision history for this message
Martin Pitt (pitti) wrote :

I rejected the latest upload, too, since the changed call to adduser looks invalid to me:

- adduser --quiet --system --ingroup nut --ingroup dialout --home /var/lib/nut --no-create-home nut
+ adduser --quiet --system nut --ingroup dialout --home /var/lib/nut --no-create-home nut

It specifies two non-option arguments now (nut nut), which isn't valid according to the manpage, and the semantics is unclear, too. Also, the user won't be in group nut any more.

The changelog is inconsistent, too:

+ * debian/nut.preinst
+ - Make sure the nut user is acutally in the nut group or upsd wont start.
+ (LP: #222761)

Please document the dialout change, too, and fix the adduser calls to put them in both groups. I suggest to make 'nut' the primary group and add a second "adduser nut dialout", and wrap both commands into a "getent passwd nut" check, and only do the two adduser calls if the user didn't exist before.