I'm trying to interface my UPS with SmartOS so it can shut down the server
safely if the battery gets low. It connects via USB and is compatible with
NUT. Since it talks to the UPS over USB, it sounds like it needs to be
installed in the global zone (please correct me if I'm wrong).

The steps I've taken so far are, first, set up pkgin to work in the global
zone:

cd /

curl -k
http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-2014Q2-x86_64.tar.gz
| gzcat | tar -xf -

pkg_admin rebuild


Then:
pkgin -y up
pkgin install ups-nut ups-nut-usb

When I do this, pkgin reports:

downloading packages...
installing packages...

installing ups-nut-2.6.5nb1...
ups-nut-2.6.5nb1: Creating user ``nut''
===========================================================================
The following users need to be created for ups-nut-2.6.5nb1:
        nut (uid = 913): nut, /var/db/nut, /usr/bin/bash
If you wish to ignore this check and either re-use an existing 'nut' user
or create a new one with a system-assigned uid then set
        PKGINSTALL_IGNORE_UIDGID=yes
in the environment.
===========================================================================
pkg_install warnings: 0, errors: 1
pkg_install error log can be found in /var/db/pkgin/pkg_install-err.log



I have tried setting PKGINSTALL_IGNORE_UIDGID=yes to see what would happen,
but it still reports the same error. pkg_install-err.log contains:

---Aug 12 20:48:51: installing ups-nut-2.6.5nb1...
UX: /usr/sbin/useradd: ERROR: Cannot update system files - login cannot be
created.
passwd: User unknown: nut
Permission denied
pkg_add: install script returned error status
pkg_add: 1 package addition failed


It looks like ups-nut is trying to create a user "nut" and that is failing,
of course SmartOS global zone cannot have it creating this user so it will
need to run under another user.

Does anyone have suggestions for getting NUT to work in SmartOS? Seems like
UPS connectivity would be a fairly common goal for many of our
installations. Thanks,

Nick



-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to