svc-cvcd revision 2eaee53e5b3d4cd48a35cd651c0a8ae149d772c5
0N/A#!/sbin/sh
0N/A#
0N/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, Version 1.0 only
0N/A# (the "License"). You may not use this file except in compliance
0N/A# with the License.
0N/A#
0N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0N/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#
0N/A#
0N/A# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
761N/A# Use is subject to license terms.
0N/A#
0N/A# ident "%Z%%M% %I% %E% SMI"
0N/A#
0N/A# Start script for cvcd
0N/A#
0N/A# For modifying parameters passed to cvcd, do not edit
0N/A# this script. Instead use svccfg(1m) to modify the SMF
0N/A# repository. For example:
0N/A#
0N/A# svccfg
0N/A# svc:> select system/cvc
0N/A# svc:system/cvc> setprop cvc/ah_auth = "md5"
0N/A# svc:/system/cvc> exit
0N/A
0N/A
0N/A. /lib/svc/share/smf_include.sh
0N/A
0N/AFMRI=svc:/system/cvc
0N/A
261N/Agetproparg() {
0N/A val=`svcprop -p $2 $FMRI`
777N/A [ -n "$val" ] && [ "$val" != 'none' ] && echo $1 $val
0N/A}
0N/A
0N/Aplatform=`/sbin/uname -i`
338N/Astarfire="SUNW,Ultra-Enterprise-10000"
0N/Astarcat="SUNW,Sun-Fire-15000"
0N/A
338N/Aargs=""
338N/Aif [ $platform = "$starcat" ]; then
777N/A args="$args `getproparg -a cvc/ah_auth`"
0N/A args="$args `getproparg -e cvc/esp_encr`"
0N/A args="$args `getproparg -u cvc/esp_auth`"
0N/Afi
868N/A
868N/Aif [ $platform = "$starfire" -o $platform = "$starcat" ]; then
868N/A /platform/$platform/lib/cvcd $args # Fail if can't execute
0N/A exit # Use cvcd's exit status
0N/Aelse
0N/A echo "$SMF_FMRI is not supported on this platform."
0N/A exit $SMF_EXIT_ERR_CONFIG
0N/Afi
0N/A
0N/Aexit 0
0N/A