649N/A# The contents of this file are subject to the terms of the
649N/A# Common Development and Distribution License (the "License").
649N/A# You may not use this file except in compliance with the License.
649N/A# See the License for the specific language governing permissions
649N/A# and limitations under the License.
649N/A# When distributing Covered Code, include this CDDL HEADER in each
649N/A# If applicable, add the following below this CDDL HEADER, with the
649N/A# fields enclosed by brackets "[]" replaced with your own identifying
649N/A# information: Portions Copyright [yyyy] [name of copyright owner]
649N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
649N/A# Use is subject to license terms.
649N/A# ident "%Z%%M% %I% %E% SMI"
1459N/A# Postinstall script for SUNWcryptoint.
919N/A# This script appends a hardware provider section for the dprov
919N/Apkg_start="# Start $PKGINST"
919N/Apkg_end="# End $PKGINST"
919N/A echo "$0: ERROR - $kcfconf doesn't exist"
919N/A# If the package has been already installed, remove old entries
649N/Aegrep -s "$pkg_start" $kcfconf && start=1
649N/Aegrep -s "$pkg_end" $kcfconf && end=1
649N/Aif [ $start -ne $end ] ; then
649N/A echo "$0: missing Start or End delimiters for $PKGINST in $kcfconf."
649N/A echo "$0: $kcfconf may be corrupted and was not updated."
649N/A cp -p $kcfconf $tmpfile || error=yes
649N/A sed -e "/$pkg_start/,/$pkg_end/d" $kcfconf > $tmpfile || error=yes
649N/A cp -p $kcfconf $tmpfile || error=yes
649N/A# Append the delimiters for this package
649N/Aecho "$pkg_start driver_names=dprov" >> $tmpfile || error=yes
649N/Aecho "$pkg_end" >> $tmpfile || error=yes
649N/A# Install the updated config file and clean up the tmp file
649N/A mv $tmpfile $kcfconf || error=yes
765N/A# All done, if any of the steps above fail, report the error
649N/A echo "$0: ERROR - failed to update $kcfconf."