postinstall revision b6c3f7863936abeae522e48a13887dddeb691a45
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER START
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License, Version 1.0 only
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# (the "License"). You may not use this file except in compliance
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# with the License.
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# See the License for the specific language governing permissions
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and limitations under the License.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User# If applicable, add the following below this CDDL HEADER, with the
1e9517ea2156b990be21f44676d3370318eacf17Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# CDDL HEADER END
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Use is subject to license terms.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# ident "%Z%%M% %I% %E% SMI"
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# "Clone" the policy for pkcs11_softtoken to the encryption kit version
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# and "disable" pkcs11_softoken. This is reversed in the preremove script.
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# Because we want to do the policy cloning and only have one of the softtoken's
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews# enabled we can't used the i.pkcs11conf class action script.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# We can't run cryptoadm(1m) here because it might not be available yet.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userif [ ! -r $pkcs11conf ]; then
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User echo "/etc/crypto/pkcs11.conf not found, this may be an attempt to \c"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User echo "install this package on an incorrect release of Solaris"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Usercp $pkcs11conf ${pkcs11conf}.tmp
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Usersed 's/pkcs11_softtoken\.so/pkcs11_softtoken_extra.so/' \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User $pkcs11conf > ${pkcs11conf}.tmp
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Usermv -f ${pkcs11conf}.tmp $pkcs11conf