xref: /illumos-gate/usr/src/cmd/dcs/sparc/sun4u/svc-dcs (revision 2eaee53e5b3d4cd48a35cd651c0a8ae149d772c5)
1*2eaee53eSmb158278#!/sbin/sh
2*2eaee53eSmb158278#
3*2eaee53eSmb158278# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
4*2eaee53eSmb158278# Use is subject to license terms.
5*2eaee53eSmb158278#
6*2eaee53eSmb158278# CDDL HEADER START
7*2eaee53eSmb158278#
8*2eaee53eSmb158278# The contents of this file are subject to the terms of the
9*2eaee53eSmb158278# Common Development and Distribution License, Version 1.0 only
10*2eaee53eSmb158278# (the "License").  You may not use this file except in compliance
11*2eaee53eSmb158278# with the License.
12*2eaee53eSmb158278#
13*2eaee53eSmb158278# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
14*2eaee53eSmb158278# or http://www.opensolaris.org/os/licensing.
15*2eaee53eSmb158278# See the License for the specific language governing permissions
16*2eaee53eSmb158278# and limitations under the License.
17*2eaee53eSmb158278#
18*2eaee53eSmb158278# When distributing Covered Code, include this CDDL HEADER in each
19*2eaee53eSmb158278# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
20*2eaee53eSmb158278# If applicable, add the following below this CDDL HEADER, with the
21*2eaee53eSmb158278# fields enclosed by brackets "[]" replaced with your own identifying
22*2eaee53eSmb158278# information: Portions Copyright [yyyy] [name of copyright owner]
23*2eaee53eSmb158278#
24*2eaee53eSmb158278# CDDL HEADER END
25*2eaee53eSmb158278#
26*2eaee53eSmb158278# ident	"%Z%%M%	%I%	%E% SMI"
27*2eaee53eSmb158278#
28*2eaee53eSmb158278# Start script for dcs
29*2eaee53eSmb158278#
30*2eaee53eSmb158278# For modifying parameters passed to dcs, do not edit
31*2eaee53eSmb158278# this script. Instead use svccfg(1m) to modify the SMF
32*2eaee53eSmb158278# repository. For example:
33*2eaee53eSmb158278#
34*2eaee53eSmb158278# svccfg
35*2eaee53eSmb158278# svc:> select platform/sun4u/dcs
36*2eaee53eSmb158278# svc:/platform/sun4u/dcs> setprop dcs/ah_auth = "md5"
37*2eaee53eSmb158278# svc:/platform/sun4u/dcs> exit
38*2eaee53eSmb158278
39*2eaee53eSmb158278
40*2eaee53eSmb158278. /lib/svc/share/smf_include.sh
41*2eaee53eSmb158278
42*2eaee53eSmb158278FMRI=svc:/platform/sun4u/dcs
43*2eaee53eSmb158278
44*2eaee53eSmb158278getproparg() {
45*2eaee53eSmb158278	val=`svcprop -p $2 $FMRI`
46*2eaee53eSmb158278	[ -n "$val" ] && [ "$val" != 'none' ] &&  echo $1 $val
47*2eaee53eSmb158278}
48*2eaee53eSmb158278
49*2eaee53eSmb158278DCS=/usr/lib/dcs
50*2eaee53eSmb158278platform=`/sbin/uname -i`
51*2eaee53eSmb158278starfire="SUNW,Ultra-Enterprise-10000"
52*2eaee53eSmb158278starcat="SUNW,Sun-Fire-15000"
53*2eaee53eSmb158278
54*2eaee53eSmb158278args=""
55*2eaee53eSmb158278if [ $platform = "$starcat" ]; then
56*2eaee53eSmb158278	args="$args `getproparg -a dcs/ah_auth`"
57*2eaee53eSmb158278	args="$args `getproparg -e dcs/esp_encr`"
58*2eaee53eSmb158278	args="$args `getproparg -u dcs/esp_auth`"
59*2eaee53eSmb158278fi
60*2eaee53eSmb158278
61*2eaee53eSmb158278if [ $platform = "$starfire" -o $platform = "$starcat" ]; then
62*2eaee53eSmb158278	$DCS $args			# Fail if can't execute
63*2eaee53eSmb158278	exit				# Use dcs's exit status
64*2eaee53eSmb158278else
65*2eaee53eSmb158278	echo "$SMF_FMRI is not supported on this platform."
66*2eaee53eSmb158278	exit $SMF_EXIT_ERR_CONFIG
67*2eaee53eSmb158278fi
68*2eaee53eSmb158278
69*2eaee53eSmb158278exit 0
70