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