[Nut-upsdev] Re: [nut-commits] svn commit r831 - in trunk: .

Peter Selinger selinger at mathstat.dal.ca
Sun Mar 4 05:34:11 CET 2007


Arnaud Quette wrote:
> 
> 2007/3/3, Peter Selinger <selinger at mathstat.dal.ca>:
> > Arnaud,
> >
> > the problem was: we want to install the hotplug scripts automatically
> > with "make install". However, we cannot assume that a group "ups"
> > exists (and if it doesn't, then there will be error messages during
> > system boot). Even if there is a user called "ups", this does not
> > guarantee that there is a group called "ups".
> >
> > So we either have to make the group name configurable, or else not use
> > a group at all.
> 
> ok, I was a bit aside.
> First, this problem doesn't apply to packages, since packagers will
> take care of ensuring that both user and group exists.
> 
> Next, while we can't be sure of the user/group existance, as Arjen
> told, it's part of the install step. We can't assert this existance
> neither at config nor install time, since for example, these are
> created at package install time. Nor we can create these
> automatically...

I agree that we should not try to create any users as part of "make
install". We do, however, have to do substitutions in files such as
scripts/udev/nut-usbups.rules.in:

SYSFS{idVendor}=="050d", SYSFS{idProduct}=="0751", MODE="664", GROUP="@RUN_AS_USER@"

Since @RUN_AS_USER@ is a username, and groupnames are not equal to
usernames in some distributions, it is not logical to use
@RUN_AS_USER@ as a group name. Therefore, what I propose is to add to
the ./configure script an option --with-group=groupname, analogously
to --with-user=username. The group name could default to $username if
not specified.

Users who follow the INSTALL file should have no problems. And we can
go back to answering useful questions on nut-upsuser, rather than
mechanically repeating "please install the hotplug files". (What
worries me slightly is that the users who have hotplugging problems
are the ones who are *not* following the INSTALL file. However, the
new default behavior should already be better for most users than the
current one). 

-- Peter



More information about the Nut-upsdev mailing list