1467N/A#! /usr/bin/sh
259N/A#
259N/A# CDDL HEADER START
259N/A#
259N/A# The contents of this file are subject to the terms of the
259N/A# Common Development and Distribution License (the "License").
259N/A# You may not use this file except in compliance with the License.
259N/A#
259N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
259N/A# or http://www.opensolaris.org/os/licensing.
259N/A# See the License for the specific language governing permissions
259N/A# and limitations under the License.
259N/A#
259N/A# When distributing Covered Code, include this CDDL HEADER in each
259N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
259N/A# If applicable, add the following below this CDDL HEADER, with the
259N/A# fields enclosed by brackets "[]" replaced with your own identifying
259N/A# information: Portions Copyright [yyyy] [name of copyright owner]
259N/A#
259N/A# CDDL HEADER END
259N/A#
5939N/A
5939N/A#
5939N/A# Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
259N/A#
259N/A
259N/A. /lib/svc/share/smf_include.sh
259N/A
259N/A# SMF_FMRI is the name of the target service. This allows multiple instances
259N/A# to use the same script.
259N/A
259N/Aif [ -z "$SMF_FMRI" ]; then
259N/A echo "SMF framework variables are not initialized."
1467N/A exit $SMF_EXIT_ERR_NOSMF
259N/Afi
259N/A
259N/Acase "$1" in
259N/A'start')
1467N/A if [ ! -r "/dev/tpm" ]; then
1467N/A smf_method_exit $SMF_EXIT_TEMP_DISABLE no_supported_hardware \
1467N/A "No TPM device /dev/tpm found"
1467N/A fi
259N/A
1467N/A echo /usr/lib/tcsd
6266N/A TCSD_FOREGROUND=1 /usr/lib/tcsd &
259N/A ;;
259N/A
1467N/A# Attribute exec=':kill' in manifest tcsd.xml stops the tcsd daemon.
259N/A
259N/A*)
1467N/A echo "Usage: $0 start"
259N/A exit 1
259N/A ;;
1467N/Aesac
259N/A
259N/Aexit $SMF_EXIT_OK