On Mon, Oct 19, 2009 at 11:41:24AM -0700, UNIX admin wrote:
> My problem is installation from a JumpStart(TM) server, or to a
> diskless or AutoClient systems: to do a -R $PKG_INSTALL_ROOT install,
> I need some way of reliably creating users.
> 
> The cleanest way that I can see is using useradd(1M); but useradd(1M)
> is not capable of operating on $PKG_INSTALL_ROOT if $PKG_INSTALL_ROOT
> is not "/".
> 
> So while useradd(1M) is trivial to implement in preinstall and
> postremove, the package won't be installable with pkgadd -R.

Ah!  I'd forgotten about that.  Yes, I agree, the only clean way is to
use an SMF service for this.

But note that this means that you have to first install the pkgs that
add the user accounts, boot if $PKG_INSTALL_ROOT != /, and then install
the remaining pkgs.  (When $PKG_INSTALL_ROOT == / your postinstall
script can just start the service that adds the users.)

Nico
-- 

Reply via email to