> if [ -z `getent group nut` ]; then
> addgroup --quiet --system nut
> -# else
> -# printf "error: user \"nut\" already exists... see
> /usr/share/doc/nut/README.Debian\n" && exit 1
> + else
> + printf "skipping: user \"nut\" already exists... see
> /usr/share/doc/nut/README.Debian\n"
> fi
> }
>
> Chuck, can you please explain how that changes the behavior? As far as I
> can see, this patch just triggers an additional warning message to
> appear (which is not good packaging, anyway; it will hardly be noticed).
> Steve, what was "the problem" when you tested upgrade? Did the upgrade
> fail (i. e. did addgroup error out because the group already existed),
> or was the problem that an already existing nut user isn't in some
> important group?
>
seconded. iirc, this fallback (nut already exist) should result in simply
checking if nut is already part of the dialout group (ie using a test -z
"getent group dialout | grep nut") and adding it if it's not.
The nut user and group should *not* be removed on purging the package,
> BTW. That's common and good Debian practice for daemons which create
> files or processes owned by that system user. Otherwise the uid/gid
> would be recycled on next adduser, and existing files/processes would
> get owned by that new user.
>
irrc, I've removed the call to check_and_delete_user in {nut,nut-cgi}.postrm
for the uid/gid recycling, I've thought before about asking for fixed ones.
the only question is: a generic one (ups, power, ...) or a specific one
(nut)?
2008/6/13 Martin Pitt <email address hidden>:
> if [ -z `getent group nut` ]; then doc/nut/ README. Debian\ n" && exit 1 doc/nut/ README. Debian\ n"
> addgroup --quiet --system nut
> -# else
> -# printf "error: user \"nut\" already exists... see
> /usr/share/
> + else
> + printf "skipping: user \"nut\" already exists... see
> /usr/share/
> fi
> }
>
> Chuck, can you please explain how that changes the behavior? As far as I
> can see, this patch just triggers an additional warning message to
> appear (which is not good packaging, anyway; it will hardly be noticed).
> Steve, what was "the problem" when you tested upgrade? Did the upgrade
> fail (i. e. did addgroup error out because the group already existed),
> or was the problem that an already existing nut user isn't in some
> important group?
>
seconded. iirc, this fallback (nut already exist) should result in simply
checking if nut is already part of the dialout group (ie using a test -z
"getent group dialout | grep nut") and adding it if it's not.
The nut user and group should *not* be removed on purging the package,
> BTW. That's common and good Debian practice for daemons which create
> files or processes owned by that system user. Otherwise the uid/gid
> would be recycled on next adduser, and existing files/processes would
> get owned by that new user.
>
irrc, I've removed the call to check_and_ delete_ user in {nut,nut- cgi}.postrm
for the uid/gid recycling, I've thought before about asking for fixed ones.
the only question is: a generic one (ups, power, ...) or a specific one
(nut)?
-- Arnaud