1*1ae08745Sheppo#!/sbin/sh 2*1ae08745Sheppo# 3*1ae08745Sheppo# Copyright 2006 Sun Microsystems, Inc. All rights reserved. 4*1ae08745Sheppo# Use is subject to license terms. 5*1ae08745Sheppo# 6*1ae08745Sheppo# CDDL HEADER START 7*1ae08745Sheppo# 8*1ae08745Sheppo# The contents of this file are subject to the terms of the 9*1ae08745Sheppo# Common Development and Distribution License (the "License"). 10*1ae08745Sheppo# You may not use this file except in compliance with the License. 11*1ae08745Sheppo# 12*1ae08745Sheppo# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 13*1ae08745Sheppo# or http://www.opensolaris.org/os/licensing. 14*1ae08745Sheppo# See the License for the specific language governing permissions 15*1ae08745Sheppo# and limitations under the License. 16*1ae08745Sheppo# 17*1ae08745Sheppo# When distributing Covered Code, include this CDDL HEADER in each 18*1ae08745Sheppo# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 19*1ae08745Sheppo# If applicable, add the following below this CDDL HEADER, with the 20*1ae08745Sheppo# fields enclosed by brackets "[]" replaced with your own identifying 21*1ae08745Sheppo# information: Portions Copyright [yyyy] [name of copyright owner] 22*1ae08745Sheppo# 23*1ae08745Sheppo# CDDL HEADER END 24*1ae08745Sheppo# 25*1ae08745Sheppo# ident "%Z%%M% %I% %E% SMI" 26*1ae08745Sheppo# 27*1ae08745Sheppo# Start script for vntsd 28*1ae08745Sheppo# 29*1ae08745Sheppo# For modifying parameters passed to vntsd, do not edit 30*1ae08745Sheppo# this script. Instead use svccfg(1m) to modify the SMF 31*1ae08745Sheppo# repository. For example: 32*1ae08745Sheppo# 33*1ae08745Sheppo# svccfg 34*1ae08745Sheppo# svc:> select ldoms/vntsd 35*1ae08745Sheppo# svc:/ldoms/vntsd> setprop vntsd/vcc_device = "virtual-console-concentrator@1" 36*1ae08745Sheppo# svc:/ldoms/vntsd> setprop vntsd/listen_addr = "192.168.1.1" 37*1ae08745Sheppo# svc:/ldoms/vntsd> exit 38*1ae08745Sheppo 39*1ae08745Sheppo. /lib/svc/share/smf_include.sh 40*1ae08745Sheppo 41*1ae08745Sheppovcc_device=`svcprop -p vntsd/vcc_device $SMF_FMRI 2>/dev/null` 42*1ae08745Sheppoif [ -z "$vcc_device" ]; then 43*1ae08745Sheppo vcc_device="virtual-console-concentrator@0" 44*1ae08745Sheppofi 45*1ae08745Sheppoargs="-i $vcc_device" 46*1ae08745Sheppo 47*1ae08745Sheppolisten_addr=`svcprop -p vntsd/listen_addr $SMF_FMRI 2>/dev/null` 48*1ae08745Sheppoif [ -n "$listen_addr" ]; then 49*1ae08745Sheppo args="$args -p $listen_addr" 50*1ae08745Sheppofi 51*1ae08745Sheppo 52*1ae08745Sheppotimeout=`svcprop -p vntsd/timeout_minutes $SMF_FMRI 2>/dev/null` 53*1ae08745Sheppoif [ -n "$timeout" ]; then 54*1ae08745Sheppo args="$args -t $timeout" 55*1ae08745Sheppofi 56*1ae08745Sheppo 57*1ae08745Sheppoif [ -x /usr/lib/ldoms/vntsd ]; then 58*1ae08745Sheppo /usr/lib/ldoms/vntsd $args || exit $SMF_EXIT_ERR_CONFIG 59*1ae08745Sheppoelse 60*1ae08745Sheppo echo "WARNING: /usr/lib/ldoms/vntsd is missing or not executable" >& 2 61*1ae08745Sheppo exit $SMF_EXIT_ERR_CONFIG 62*1ae08745Sheppofi 63*1ae08745Sheppo 64*1ae08745Sheppoexit $SMF_EXIT_OK 65