David Bustos wrote:

>Quoth Artem Kachitchkine on Wed, Nov 01, 2006 at 04:48:08PM -0800:
>  
>
>>We removed svc:/system/filesystem/volfs and its package SUNWvolr in snv_51. 
>>Yet the service won't be deleted on upgrade, because the r.manifest class 
>>action script currently runs svccfg only when PKG_INSTALL_ROOT is /.
>>    
>>
>
>This is bug 6438829.
>
>  
>
>>As a workaround, David Bustos suggested that we use postinstall script from 
>>an existing package to append 'svccfg delete volfs' to the upgrade profile. 
>>Incidentally, SUNWvolr is replaced by the new SUNWsmediar, i.e. we'll have 
>>in .pkghistory:
>>
>>PKG=SUNWvolr
>>REPLACED_BY=SUNWsmediar
>>REMOVE_FROM_CLUSTER=ALL
>>
>>So we can put something like this in SUNWsmediar/postinstall:
>>
>>if [ "${PKG_INSTALL_ROOT:-/}" != "/" ]; then
>>        # upgrade
>>        cat >> ${PKG_INSTALL_ROOT}/var/svc/profile/upgrade <<-EOF
>>        /usr/sbin/svccfg delete svc:/system/filesystem/volfs:default
>>EOF
>>fi
>>
>>Doable?
>>    
>>
>
>You should use delete -f, I think.  The start method & binaries will be
>gone, right?  And you should delete volfs, not volfs:default.  
>
>/var/svc/profile/upgrade is private, so to use it you'll have to sign an
>ARC contract with the SMF team.
>  
>

This morning I filed 6493109 for the problem with the pfil service
not yet being removed on an upgrade.  Following this, it has been
suggested to use the following as the means to remove it:
----------------------------------

Is there a reason why you can't do what SUNWcsr postinstall does:

SVCCFG_REPOSITORY=$PKG_INSTALL_ROOT/etc/svc/repository.db
export SVCCFG_REPOSITORY
if [ -x /usr/sbin/svcadm -a -x /usr/sbin/svccfg -a \
    -f $PKG_INSTALL_ROOT/var/svc/manifest/network/datalink.xml ]; then
        if [ -r $PKG_INSTALL_ROOT/etc/svc/volatile/repository_door ]; then
                #
                # Local package install.  Need to disable the services first
                # before deleting.
                #
                svcadm disable -s svc:/network/aggregation >/dev/null 2>&1
                svcadm disable -s svc:/network/datalink-init >/dev/null 2>&1
                svcadm disable -s svc:/network/datalink >/dev/null 2>&1
        fi
        svccfg delete svc:/network/aggregation >/dev/null 2>&1
        svccfg delete svc:/network/datalink-init >/dev/null 2>&1
        svccfg delete svc:/network/datalink >/dev/null 2>&1
fi
------------------------------

How does this method compare with using /var/svc/profile/upgrade?

And what is the process for obtaining a contract to use the
file /var/svc/profile/upgrade ?

Darren



Reply via email to