Ritu:
Your CAS scripts is not live upgrade and jumpstart compliance. YOu can
look at SUNWmcosx/postinstall and see how this can be done.
As James Carlson had indicated, you should use /sbin/zonename instead.
Ritu Agrawal wrote:
> Opening to [EMAIL PROTECTED]
>
>
> James Carlson wrote:
>> Why is this on zones-discuss-confidential? I don't see anything
>> confidential here. Please use the main opensolaris.org list.
>>
>> Ritu Agrawal writes:
>>
>>> We're running into some problems when we run zonename in an alternate
>>> root. The following error messages are seen :
>>>
>>> ld.so.1: zonename: fatal: libc.so.1: version `SUNW_1.22' not found
>>> (required by file /altroot.5.10/sbin/zonename)
>>> ld.so.1: zonename: fatal: libc.so.1: open failed: No such file or
>>> directory
>>>
>>
>> It looks to me like you're trying to run a binary that's inside an
>> alternate root itself, and that Zones really has nothing to do with
>> the problem.
>>
>> Binaries in alternate root environments cannot be guaranteed to work.
>> They depend in undocumented ways on libraries found in the alternate
>> environment, and those libraries in turn depend on the kernel itself
>> in undocumented ways.
>>
>> Use /sbin/zonename and you should be fine
>
> This is a Live upgrade case when we are on the alternate root. The
> alternate root has the O/S installed and we try to upgrade some of our
> packages. Please note that this is all happening in the alternate root.
> We attempt to do a pkgadd -d <dir> -R <altroot> <pkgname>. The
> package/postinstall inturn does a zonename first. Since we are in the
> alternate root, the command thats run is <altroot>/usr/bin/zonename
> which is when it fails.
>
> Here's a code snippet :
>
> ZONECMD=${PKG_INSTALL_ROOT}/usr/bin/zonename
> IS_NONGLOBAL=0
>
> # detect whether we are running in a global or non-global zone
> if [ "${SUNW_PKG_INSTALL_ZONENAME}" = "" ] ; then
> if [ -x ${ZONECMD} ]; then
> <==========================FAILS HERE since the command thats run is
> </altroot>/usr/bin/zonename
>
>
> if [ "`${ZONECMD}`" != "global" ]; then
> IS_NONGLOBAL=1
> fi
> fi
> else
> if [ "${SUNW_PKG_INSTALL_ZONENAME}" != "global" ] ; then
> IS_NONGLOBAL=1
> fi
> fi
>
> # If installing into a non-global zone, simply exit
> if [ ${IS_NONGLOBAL} -eq 1 ] ; then
> exit 0
> fi
>
>
> Ritu
>> .
>>
>>
>>> Is this the expected behavior ? The problem shows up when we attempt
>>> a Live Upgrade and one of the postinstall script attempts to run
>>> "zonename" in the alternate root.
>>>
>>
>> Why isn't it using /sbin/zonename?
>>
>>
>
_______________________________________________
zones-discuss mailing list
[email protected]