i.kcfconfbase revision f66d273d14eede3a1bb803a39414588d8f143a98
98N/A#!/bin/sh
98N/A#
1339N/A# CDDL HEADER START
98N/A#
98N/A# The contents of this file are subject to the terms of the
919N/A# Common Development and Distribution License, Version 1.0 only
919N/A# (the "License"). You may not use this file except in compliance
919N/A# with the License.
919N/A#
919N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A# or http://www.opensolaris.org/os/licensing.
919N/A# See the License for the specific language governing permissions
919N/A# and limitations under the License.
919N/A#
919N/A# When distributing Covered Code, include this CDDL HEADER in each
919N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A# If applicable, add the following below this CDDL HEADER, with the
919N/A# fields enclosed by brackets "[]" replaced with your own identifying
919N/A# information: Portions Copyright [yyyy] [name of copyright owner]
919N/A#
919N/A# CDDL HEADER END
919N/A#
98N/A#
98N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
98N/A# Use is subject to license terms.
98N/A#
493N/A# ident "%Z%%M% %I% %E% SMI"
98N/A
970N/Awhile read src dest
970N/Ado
970N/A if [ ! -f $dest ] ; then
970N/A cp $src $dest
1339N/A else
1339N/A egrep '^arcfour' $dest > /dev/null 2>&1
1339N/A if [ $? != 0 ]; then
98N/A rc4=`egrep '^arcfour' $src`
1301N/A fi
98N/A egrep '^rsa' $dest > /dev/null 2>&1
911N/A if [ $? != 0 ]; then
1301N/A rsa=`egrep '^rsa' $src`
1301N/A fi
1301N/A egrep '^sha2' $dest > /dev/null 2>&1
911N/A if [ $? != 0 ]; then
98N/A sha2=`egrep '^sha2' $src`
98N/A fi
98N/A egrep '^swrand' $dest > /dev/null 2>&1
1056N/A if [ $? != 0 ]; then
1056N/A swrand=`egrep '^swrand' $src`
1056N/A fi
1056N/A export rsa
1056N/A export rc4
970N/A export sha2
1056N/A export swrand
1056N/A nawk '/^# End SUNWcsr/ { \
970N/A if (ENVIRON["rc4"] != "") {print ENVIRON["rc4"]} \
98N/A if (ENVIRON["rsa"] != "") {print ENVIRON["rsa"]} \
98N/A if (ENVIRON["sha2"] != "") {print ENVIRON["sha2"]} \
if (ENVIRON["swrand"] != "") {print ENVIRON["swrand"]} \
} \
{ print } \
' $dest > $dest.$$
mv $dest.$$ $dest
fi
done
exit 0