I'm installing a package into a zone

The pkgadd command works correctly from within the zone, e.g.

[i]global # zlogin my-zone
my-zone # pkgadd -d ...[/i]

However, when I try the same command but as an argument to zlogin, it fails. 
(pkgadd: ERROR: checkinstall script did not complete successfully) e.g.

[i]global # zlogin my-zone /usr/sbin/pkgadd -d /export/share/my-zone/Latest -n 
-a /export/share/my-zone/install.admin -r /export/share/my-zone/MYpkg.resp MYpkg

I've managed to track this down to this line in the checkinstall script of the 
package (checks for version number of different package):

[i]Thisver=`grep VERSION /var/sadm/pkg/${TMPLT_PKG}/pkginfo | nawk '{FS="="; 
print $2}'`[/i]

When I change this to:

[i]Thisver=`pkgparam ${TMPLT_PKG} VERSION`[/i]

the zlogin pkgadd works fine...

What exactly about the original line is causing the pkgadd to fail (since the 
pkgadd works from the commandline within the zone)?

This message posted from opensolaris.org
zones-discuss mailing list

Reply via email to