xref: /titanic_41/usr/src/cmd/dcs/sparc/sun4u/svc-dcs (revision a1e4d62bc1ea0bd683c63f185da43cda7aec8f20)
12eaee53eSmb158278#!/sbin/sh
22eaee53eSmb158278#
32eaee53eSmb158278# CDDL HEADER START
42eaee53eSmb158278#
52eaee53eSmb158278# The contents of this file are subject to the terms of the
625cf1a30Sjl139090# Common Development and Distribution License (the "License").
725cf1a30Sjl139090# You may not use this file except in compliance with the License.
82eaee53eSmb158278#
92eaee53eSmb158278# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
102eaee53eSmb158278# or http://www.opensolaris.org/os/licensing.
112eaee53eSmb158278# See the License for the specific language governing permissions
122eaee53eSmb158278# and limitations under the License.
132eaee53eSmb158278#
142eaee53eSmb158278# When distributing Covered Code, include this CDDL HEADER in each
152eaee53eSmb158278# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
162eaee53eSmb158278# If applicable, add the following below this CDDL HEADER, with the
172eaee53eSmb158278# fields enclosed by brackets "[]" replaced with your own identifying
182eaee53eSmb158278# information: Portions Copyright [yyyy] [name of copyright owner]
192eaee53eSmb158278#
202eaee53eSmb158278# CDDL HEADER END
212eaee53eSmb158278#
22*a1e4d62bShshaw
23*a1e4d62bShshaw#
24*a1e4d62bShshaw# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25*a1e4d62bShshaw# Use is subject to license terms.
26*a1e4d62bShshaw#
272eaee53eSmb158278# ident	"%Z%%M%	%I%	%E% SMI"
282eaee53eSmb158278#
292eaee53eSmb158278# Start script for dcs
302eaee53eSmb158278#
312eaee53eSmb158278# For modifying parameters passed to dcs, do not edit
322eaee53eSmb158278# this script. Instead use svccfg(1m) to modify the SMF
332eaee53eSmb158278# repository. For example:
342eaee53eSmb158278#
352eaee53eSmb158278# svccfg
362eaee53eSmb158278# svc:> select platform/sun4u/dcs
372eaee53eSmb158278# svc:/platform/sun4u/dcs> setprop dcs/ah_auth = "md5"
382eaee53eSmb158278# svc:/platform/sun4u/dcs> exit
392eaee53eSmb158278
402eaee53eSmb158278
412eaee53eSmb158278. /lib/svc/share/smf_include.sh
422eaee53eSmb158278
432eaee53eSmb158278getproparg() {
44*a1e4d62bShshaw	val=`svcprop -p $2 $SMF_FMRI`
452eaee53eSmb158278	[ -n "$val" ] && [ "$val" != 'none' ] &&  echo $1 $val
462eaee53eSmb158278}
472eaee53eSmb158278
482eaee53eSmb158278DCS=/usr/lib/dcs
492eaee53eSmb158278platform=`/sbin/uname -i`
5025cf1a30Sjl139090e10k="SUNW,Ultra-Enterprise-10000"
5125cf1a30Sjl139090sf15k="SUNW,Sun-Fire-15000"
5225cf1a30Sjl139090opl="SUNW,SPARC-Enterprise"
532eaee53eSmb158278
542eaee53eSmb158278args=""
5525cf1a30Sjl139090if [ $platform = "$sf15k" ]; then
562eaee53eSmb158278	args="$args `getproparg -a dcs/ah_auth`"
572eaee53eSmb158278	args="$args `getproparg -e dcs/esp_encr`"
582eaee53eSmb158278	args="$args `getproparg -u dcs/esp_auth`"
590b05a701Smcwalterelif [ $platform = "$opl" ]; then
6025cf1a30Sjl139090	args="-l"
612eaee53eSmb158278fi
622eaee53eSmb158278
6325cf1a30Sjl139090if [ $platform = "$e10k" -o $platform = "$sf15k" -o \
640b05a701Smcwalter     $platform = "$opl" ]; then
652eaee53eSmb158278	$DCS $args			# Fail if can't execute
662eaee53eSmb158278	exit				# Use dcs's exit status
672eaee53eSmb158278else
682eaee53eSmb158278	echo "$SMF_FMRI is not supported on this platform."
692eaee53eSmb158278	exit $SMF_EXIT_ERR_CONFIG
702eaee53eSmb158278fi
712eaee53eSmb158278
722eaee53eSmb158278exit 0
73