Fat Ted wrote:
> Hi,
> Is it possible to create a sparse root zone from within a package's 
> postinstall script?
> I've created a package; and via the postinstall script, I want to create a 
> basic sparse root zone. Despite the postinstall script working fine as a 
> stand alone script (creates zone no problemo), it fails as a "postinstall" 
> script during a pkgadd...
> Error comes out as (from zoneadm ... install):
> ERROR: Unable to acquire zone administration lock for this system; please try 
> again later
> ERROR: cannot create zone boot environment
> zoneadm: zone 'bose-zone': '/usr/lib/lu/lucreatezone' failed with exit code 
> 94.
> (I've tried deleting the /tmp/.ai.pkg.zone.lock-xxx... file, and the zone 
> partially installs, but gives errors for just about every package: 
> "Installation of these packages generated errors: <SMCphp FJSVvplr 
> FJSVvplu SUNWcakr SUNWcar SUNWkvm FJSVhea SUNWjdmk-base SUNWckr SUNWcnetr 
> SUNWcsl SUNWcsr SUNWcsu... and about another 600 :)".
> If you then try and boot, the zone mounts (STATUS = mounted, which was a new 
> one for me, [i]zoneadm -z zone unmount[/i] to cancel this:))
> Any hot tips?
> Cheers!
> This message posted from opensolaris.org
> _______________________________________________
> zones-discuss mailing list
> zones-discuss@opensolaris.org
Basically zoneadm install cannot run if pkgadd itself is running in the 
global for the package you are installing, as the package is locked down 
until we finish.

Why are you doing this in a package postinstall script?
Doesn't seem like a suitable place for this kind of work at all, 
basically postinstall is ideally meant to finalise the package install 
for the particular package being installed, not for doing other sysadmin 
work such as creating zones.

Basically even if this worked, and assuming we waited till the zone got 
created before exiting postinstall, pkgadd would run for perhaps half 
hour depending, which would not be good.

zones-discuss mailing list

Reply via email to