xref: /illumos-gate/usr/src/cmd/dcs/sparc/sun4u/svc-dcs (revision 2a1fd0ffe121888d44fdec321c25b53dcfaa9118)
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#
22a1e4d62bShshaw
23a1e4d62bShshaw#
24a1e4d62bShshaw# Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
25a1e4d62bShshaw# Use is subject to license terms.
26*2a1fd0ffSPeter Tribble# Copyright 2019 Peter Tribble.
272eaee53eSmb158278#
282eaee53eSmb158278# Start script for dcs
292eaee53eSmb158278#
302eaee53eSmb158278# For modifying parameters passed to dcs, do not edit
312eaee53eSmb158278# this script. Instead use svccfg(1m) to modify the SMF
322eaee53eSmb158278# repository. For example:
332eaee53eSmb158278#
342eaee53eSmb158278# svccfg
352eaee53eSmb158278# svc:> select platform/sun4u/dcs
362eaee53eSmb158278# svc:/platform/sun4u/dcs> setprop dcs/ah_auth = "md5"
372eaee53eSmb158278# svc:/platform/sun4u/dcs> exit
382eaee53eSmb158278
392eaee53eSmb158278
402eaee53eSmb158278. /lib/svc/share/smf_include.sh
412eaee53eSmb158278
422eaee53eSmb158278getproparg() {
43a1e4d62bShshaw	val=`svcprop -p $2 $SMF_FMRI`
442eaee53eSmb158278	[ -n "$val" ] && [ "$val" != 'none' ] &&  echo $1 $val
452eaee53eSmb158278}
462eaee53eSmb158278
472eaee53eSmb158278DCS=/usr/lib/dcs
482eaee53eSmb158278platform=`/sbin/uname -i`
4925cf1a30Sjl139090sf15k="SUNW,Sun-Fire-15000"
5025cf1a30Sjl139090opl="SUNW,SPARC-Enterprise"
512eaee53eSmb158278
522eaee53eSmb158278args=""
5325cf1a30Sjl139090if [ $platform = "$sf15k" ]; then
542eaee53eSmb158278	args="$args `getproparg -a dcs/ah_auth`"
552eaee53eSmb158278	args="$args `getproparg -e dcs/esp_encr`"
562eaee53eSmb158278	args="$args `getproparg -u dcs/esp_auth`"
570b05a701Smcwalterelif [ $platform = "$opl" ]; then
5825cf1a30Sjl139090	args="-l"
592eaee53eSmb158278fi
602eaee53eSmb158278
61*2a1fd0ffSPeter Tribbleif [ $platform = "$sf15k" -o $platform = "$opl" ]; then
622eaee53eSmb158278	$DCS $args			# Fail if can't execute
632eaee53eSmb158278	exit				# Use dcs's exit status
642eaee53eSmb158278else
652eaee53eSmb158278	echo "$SMF_FMRI is not supported on this platform."
662eaee53eSmb158278	exit $SMF_EXIT_ERR_CONFIG
672eaee53eSmb158278fi
682eaee53eSmb158278
692eaee53eSmb158278exit 0
70