# The contents of this file are subject to the terms of the
# Common Development and Distribution License, Version 1.0 only
# (the "License"). You may not use this file except in compliance
# See the License for the specific language governing permissions
# and limitations under the License.
# When distributing Covered Code, include this CDDL HEADER in each
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
# ident "%Z%%M% %I% %E% SMI"
# Removal class action script for "pkcs11conf" class files.
# This script removes entries belonging to the package from the
pkg_start="# Start $PKGINST"
tmpfile=/tmp/$$pkcs11conf
# For multiple input files; exit if error occurred in preious
echo "$0: failed to update $lastdest for $PKGINST."
# Strip all entries belonging to this package
egrep -s "$pkg_start" $dest && start=1
egrep -s "$pkg_end" $dest && end=1
if [ $start -ne $end ] ; then
echo "$0: missing Start or End delimiters for $PKGINST in \
echo "$0: $dest may be corrupted and was not updated."
sed -e "/$pkg_start/,/$pkg_end/d" $dest > $tmpfile || error=yes
mv $tmpfile $dest || error=yes
echo "$0: WARNING - no entries found in $dest for $PKGINST."
echo "$0: ERROR - failed to update $lastdest for $PKGINST."