# # Copyright 1993,2003 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "@(#)postinstall 1.8 03/06/10 SMI" # # install a domestic version of the libcrypt symlink # in place of the international symlink. sparc_postinstall () { # remove the international link if it exists # if [ -h $BASEDIR/usr/lib/sparcv9/libcrypt.so ]; then rm -f $BASEDIR/usr/lib/sparcv9/libcrypt.so fi if [ -h $BASEDIR/usr/lib/sparcv9/libcrypt.so.1 ]; then rm -f $BASEDIR/usr/lib/sparcv9/libcrypt.so.1 fi # make the symlink # ln -s libcrypt_d.so $BASEDIR/usr/lib/sparcv9/libcrypt.so || exit 2 ln -s libcrypt_d.so.1 $BASEDIR/usr/lib/sparcv9/libcrypt.so.1 || exit 2 } # remove the international link if it exists if [ -h $BASEDIR/usr/lib/libcrypt.a ]; then rm -f $BASEDIR/usr/lib/libcrypt.a fi if [ -h $BASEDIR/usr/lib/libcrypt.so ]; then rm -f $BASEDIR/usr/lib/libcrypt.so fi if [ -h $BASEDIR/usr/lib/libcrypt.so.1 ]; then rm -f $BASEDIR/usr/lib/libcrypt.so.1 fi # make the symlink # if [ -f $BASEDIR/usr/lib/libcrypt_d.a ] then ln -s libcrypt_d.a $BASEDIR/usr/lib/libcrypt.a || exit 2 fi ln -s libcrypt_d.so $BASEDIR/usr/lib/libcrypt.so || exit 2 ln -s libcrypt_d.so.1 $BASEDIR/usr/lib/libcrypt.so.1 || exit 2 if [ "$ARCH" = "sparc" ]; then sparc_postinstall; fi; # "Clone" the policy for pkcs11_softtoken to the encryption kit version # and "disable" pkcs11_softoken. This is reversed in the preremove script. # # Because we want to do the policy cloning and only have one of the softtoken's # enabled we can't used the i.pkcs11conf class action script. # We can't run cryptoadm(1m) here because it might not be available yet. pkcs11conf=$BASEDIR/etc/crypto/pkcs11.conf if [ ! -r $pkcs11conf ]; then echo "/etc/crypto/pkcs11.conf not found, this may be an attempt to \c" echo "install this package on an incorrect release of Solaris" exit 2 fi cp $pkcs11conf ${pkcs11conf}.tmp sed 's/pkcs11_softtoken\.so/pkcs11_softtoken_extra.so/' \ $pkcs11conf > ${pkcs11conf}.tmp mv -f ${pkcs11conf}.tmp $pkcs11conf exit 0