1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# CDDL HEADER START
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# The contents of this file are subject to the terms of the
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# Common Development and Distribution License (the "License").
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# You may not use this file except in compliance with the License.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# See the License for the specific language governing permissions
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# and limitations under the License.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# When distributing Covered Code, include this CDDL HEADER in each
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# If applicable, add the following below this CDDL HEADER, with the
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# fields enclosed by brackets "[]" replaced with your own identifying
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# information: Portions Copyright [yyyy] [name of copyright owner]
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# CDDL HEADER END
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# Use is subject to license terms.
844e62a3ec8c8ff5175bb35d1c38446e060730f6raghuramVLDS='/devices/virtual-devices@100/channel-devices@200/virtual-domain-service@0:vlds'
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo echo "The $SVCNAME service is not supported on this platform."
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo echo "The $SVCNAME service has been disabled because " \
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo "it is not supported in a local zone."
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# The Logical Domains agents service is enabled by default on sun4v platforms.
844e62a3ec8c8ff5175bb35d1c38446e060730f6raghuram# However it can fail to start if the domain has a machine description in which
844e62a3ec8c8ff5175bb35d1c38446e060730f6raghuram# the vlds node is not defined (because it has an old MD or firmware). So we
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# check if a vlds device is effectively defined. If not then we disable the
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# service for this session. We don't return an error so that the service does
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# not go into the maintenance state and generate spurious error (especially if
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo# the system is not configured with LDoms). The service is not permanently
d10e4ef2fabf16c3237c6d6592496df3eac6a1efnarayan# disabled so that the service can come up if the domain is restarted with a
d10e4ef2fabf16c3237c6d6592496df3eac6a1efnarayan# compatible MD.
844e62a3ec8c8ff5175bb35d1c38446e060730f6raghuramif [ ! -c "$VLDS" ]; then
844e62a3ec8c8ff5175bb35d1c38446e060730f6raghuram echo "The $SVCNAME service has been disabled because the system" \
844e62a3ec8c8ff5175bb35d1c38446e060730f6raghuram "has no virtual domain service (vlds) device."
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppoif [ ! -x "$LDMAD" ]; then
1ae0874509b6811fdde1dfd46f0d93fd09867a3fheppo echo "The $SVCNAME service requires the $LDMAD executable."