preremove revision b6c3f7863936abeae522e48a13887dddeb691a45
0N/A#
3909N/A# CDDL HEADER START
0N/A#
0N/A# The contents of this file are subject to the terms of the
0N/A# Common Development and Distribution License (the "License").
0N/A# You may not use this file except in compliance with the License.
2362N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2362N/A# or http://www.opensolaris.org/os/licensing.
0N/A# See the License for the specific language governing permissions
0N/A# and limitations under the License.
0N/A#
0N/A# When distributing Covered Code, include this CDDL HEADER in each
0N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A# If applicable, add the following below this CDDL HEADER, with the
0N/A# fields enclosed by brackets "[]" replaced with your own identifying
0N/A# information: Portions Copyright [yyyy] [name of copyright owner]
0N/A#
0N/A# CDDL HEADER END
0N/A#
2362N/A#
2362N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
2362N/A# Use is subject to license terms.
0N/A#
0N/A# ident "%Z%%M% %I% %E% SMI"
0N/A#
0N/A
0N/A# This preremove script "clones" the policy for aes256/arcfour2048/blowfish448
0N/A# to the back to the base aes, arcfour, and blowfish modules.
0N/A# Because we want to do the policy cloning and only have one of the modules's
0N/A# enabled we can't used the i.kcfconf class action script.
0N/A# We can't run cryptoadm(1m) here because it might not be available.
0N/A
0N/Akcfconf=$BASEDIR/etc/crypto/kcf.conf
0N/Aif [ ! -r $kcfconf ]; then
1365N/A echo "/etc/crypto/kcf.conf not found, this may be an attempt to \c"
1365N/A echo "install this package on an incorrect release of Solaris"
1365N/A exit 2
1365N/Afi
1365N/A
1365N/Acp $kcfconf ${kcfconf}.tmp
1365N/A
1365N/Ased -e 's/^aes256:/aes:/' -e 's/^blowfish448:/blowfish:/' -e \
0N/A 's/^arcfour2048:/arcfour:/' \
0N/A $kcfconf > ${kcfconf}.tmp
0N/A
0N/Amv -f ${kcfconf}.tmp $kcfconf
0N/A
0N/Aif [ ${BASEDIR:="/"} = "/" ]; then
0N/A [ -x /usr/sbin/cryptoadm ] && /usr/sbin/cryptoadm refresh
0N/A [ -x /usr/sbin/ipsecalgs ] && /usr/sbin/ipsecalgs -s
803N/Afi
0N/A
0N/Aexit 0
0N/A