xref: /titanic_44/usr/src/cmd/cvcd/svc-cvcd (revision a1e4d62bc1ea0bd683c63f185da43cda7aec8f20)
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
6*a1e4d62bShshaw# Common Development and Distribution License (the "License").
7*a1e4d62bShshaw# You may not use this file except in compliance with the License.
87c478bd9Sstevel@tonic-gate#
97c478bd9Sstevel@tonic-gate# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
107c478bd9Sstevel@tonic-gate# or http://www.opensolaris.org/os/licensing.
117c478bd9Sstevel@tonic-gate# See the License for the specific language governing permissions
127c478bd9Sstevel@tonic-gate# and limitations under the License.
137c478bd9Sstevel@tonic-gate#
147c478bd9Sstevel@tonic-gate# When distributing Covered Code, include this CDDL HEADER in each
157c478bd9Sstevel@tonic-gate# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
167c478bd9Sstevel@tonic-gate# If applicable, add the following below this CDDL HEADER, with the
177c478bd9Sstevel@tonic-gate# fields enclosed by brackets "[]" replaced with your own identifying
187c478bd9Sstevel@tonic-gate# information: Portions Copyright [yyyy] [name of copyright owner]
197c478bd9Sstevel@tonic-gate#
207c478bd9Sstevel@tonic-gate# CDDL HEADER END
217c478bd9Sstevel@tonic-gate#
227c478bd9Sstevel@tonic-gate#
23*a1e4d62bShshaw# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate# Use is subject to license terms.
257c478bd9Sstevel@tonic-gate#
267c478bd9Sstevel@tonic-gate# ident	"%Z%%M%	%I%	%E% SMI"
277c478bd9Sstevel@tonic-gate#
287c478bd9Sstevel@tonic-gate# Start script for cvcd
297c478bd9Sstevel@tonic-gate#
302eaee53eSmb158278# For modifying parameters passed to cvcd, do not edit
312eaee53eSmb158278# this script. Instead use svccfg(1m) to modify the SMF
322eaee53eSmb158278# repository. For example:
332eaee53eSmb158278#
342eaee53eSmb158278# svccfg
352eaee53eSmb158278# svc:> select system/cvc
362eaee53eSmb158278# svc:system/cvc> setprop cvc/ah_auth = "md5"
372eaee53eSmb158278# svc:/system/cvc> exit
382eaee53eSmb158278
397c478bd9Sstevel@tonic-gate
407c478bd9Sstevel@tonic-gate. /lib/svc/share/smf_include.sh
417c478bd9Sstevel@tonic-gate
422eaee53eSmb158278getproparg() {
43*a1e4d62bShshaw	val=`svcprop -p $2 $SMF_FMRI`
442eaee53eSmb158278	[ -n "$val" ] && [ "$val" != 'none' ] &&  echo $1 $val
452eaee53eSmb158278}
462eaee53eSmb158278
477c478bd9Sstevel@tonic-gateplatform=`/sbin/uname -i`
487c478bd9Sstevel@tonic-gatestarfire="SUNW,Ultra-Enterprise-10000"
497c478bd9Sstevel@tonic-gatestarcat="SUNW,Sun-Fire-15000"
507c478bd9Sstevel@tonic-gate
512eaee53eSmb158278args=""
522eaee53eSmb158278if [ $platform = "$starcat" ]; then
532eaee53eSmb158278	args="$args `getproparg -a cvc/ah_auth`"
542eaee53eSmb158278	args="$args `getproparg -e cvc/esp_encr`"
552eaee53eSmb158278	args="$args `getproparg -u cvc/esp_auth`"
562eaee53eSmb158278fi
572eaee53eSmb158278
587c478bd9Sstevel@tonic-gateif [ $platform = "$starfire" -o $platform = "$starcat" ]; then
592eaee53eSmb158278	/platform/$platform/lib/cvcd $args	# Fail if can't execute
607c478bd9Sstevel@tonic-gate	exit					# Use cvcd's exit status
617c478bd9Sstevel@tonic-gateelse
627c478bd9Sstevel@tonic-gate	echo "$SMF_FMRI is not supported on this platform."
637c478bd9Sstevel@tonic-gate	exit $SMF_EXIT_ERR_CONFIG
647c478bd9Sstevel@tonic-gatefi
657c478bd9Sstevel@tonic-gate
667c478bd9Sstevel@tonic-gateexit 0
67