xref: /titanic_51/usr/src/cmd/cvcd/svc-cvcd (revision 2eaee53e5b3d4cd48a35cd651c0a8ae149d772c5)
1c0931194Srm88369#!/sbin/sh
27c478bd9Sstevel@tonic-gate#
37c478bd9Sstevel@tonic-gate# CDDL HEADER START
47c478bd9Sstevel@tonic-gate#
57c478bd9Sstevel@tonic-gate# The contents of this file are subject to the terms of the
67c478bd9Sstevel@tonic-gate# Common Development and Distribution License, Version 1.0 only
77c478bd9Sstevel@tonic-gate# (the "License").  You may not use this file except in compliance
87c478bd9Sstevel@tonic-gate# with the License.
97c478bd9Sstevel@tonic-gate#
107c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
117c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
127c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
137c478bd9Sstevel@tonic-gate# and limitations under the License.
147c478bd9Sstevel@tonic-gate#
157c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
167c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
177c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
187c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
197c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
207c478bd9Sstevel@tonic-gate#
217c478bd9Sstevel@tonic-gate# CDDL HEADER END
227c478bd9Sstevel@tonic-gate#
237c478bd9Sstevel@tonic-gate#
24c0931194Srm88369# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
257c478bd9Sstevel@tonic-gate# Use is subject to license terms.
267c478bd9Sstevel@tonic-gate#
277c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
287c478bd9Sstevel@tonic-gate#
297c478bd9Sstevel@tonic-gate# Start script for cvcd
307c478bd9Sstevel@tonic-gate#
31*2eaee53eSmb158278# For modifying parameters passed to cvcd, do not edit
32*2eaee53eSmb158278# this script. Instead use svccfg(1m) to modify the SMF
33*2eaee53eSmb158278# repository. For example:
34*2eaee53eSmb158278#
35*2eaee53eSmb158278# svccfg
36*2eaee53eSmb158278# svc:> select system/cvc
37*2eaee53eSmb158278# svc:system/cvc> setprop cvc/ah_auth = "md5"
38*2eaee53eSmb158278# svc:/system/cvc> exit
39*2eaee53eSmb158278
407c478bd9Sstevel@tonic-gate
417c478bd9Sstevel@tonic-gate. /lib/svc/share/smf_include.sh
427c478bd9Sstevel@tonic-gate
43*2eaee53eSmb158278FMRI=svc:/system/cvc
44*2eaee53eSmb158278
45*2eaee53eSmb158278getproparg() {
46*2eaee53eSmb158278	val=`svcprop -p $2 $FMRI`
47*2eaee53eSmb158278	[ -n "$val" ] && [ "$val" != 'none' ] &&  echo $1 $val
48*2eaee53eSmb158278}
49*2eaee53eSmb158278
507c478bd9Sstevel@tonic-gateplatform=`/sbin/uname -i`
517c478bd9Sstevel@tonic-gatestarfire="SUNW,Ultra-Enterprise-10000"
527c478bd9Sstevel@tonic-gatestarcat="SUNW,Sun-Fire-15000"
537c478bd9Sstevel@tonic-gate
54*2eaee53eSmb158278args=""
55*2eaee53eSmb158278if [ $platform = "$starcat" ]; then
56*2eaee53eSmb158278	args="$args `getproparg -a cvc/ah_auth`"
57*2eaee53eSmb158278	args="$args `getproparg -e cvc/esp_encr`"
58*2eaee53eSmb158278	args="$args `getproparg -u cvc/esp_auth`"
59*2eaee53eSmb158278fi
60*2eaee53eSmb158278
617c478bd9Sstevel@tonic-gateif [ $platform = "$starfire" -o $platform = "$starcat" ]; then
62*2eaee53eSmb158278	/platform/$platform/lib/cvcd $args	# Fail if can't execute
637c478bd9Sstevel@tonic-gate	exit					# Use cvcd's exit status
647c478bd9Sstevel@tonic-gateelse
657c478bd9Sstevel@tonic-gate	echo "$SMF_FMRI is not supported on this platform."
667c478bd9Sstevel@tonic-gate	exit $SMF_EXIT_ERR_CONFIG
677c478bd9Sstevel@tonic-gatefi
687c478bd9Sstevel@tonic-gate
697c478bd9Sstevel@tonic-gateexit 0
70