5255N/A#!/sbin/sh
5255N/A#
5255N/A# CDDL HEADER START
5255N/A#
5255N/A# The contents of this file are subject to the terms of the
5255N/A# Common Development and Distribution License (the "License").
5255N/A# You may not use this file except in compliance with the License.
5255N/A#
5255N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5255N/A# or http://www.opensolaris.org/os/licensing.
5255N/A# See the License for the specific language governing permissions
5255N/A# and limitations under the License.
5255N/A#
5255N/A# When distributing Covered Code, include this CDDL HEADER in each
5255N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5255N/A# If applicable, add the following below this CDDL HEADER, with the
5255N/A# fields enclosed by brackets "[]" replaced with your own identifying
5255N/A# information: Portions Copyright [yyyy] [name of copyright owner]
5255N/A#
5255N/A# CDDL HEADER END
5255N/A#
5255N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
5255N/A# Use is subject to license terms.
5255N/A#
5255N/A# ident "@(#)svc-avahi-bridge-dsd 1.1 06/04/24 SMI"
5255N/A
5255N/AFMRI=svc:/system/avahi-bridge-dsd:default
5255N/A
5255N/A. /lib/svc/share/smf_include.sh
5255N/A
5255N/Aif [ ! -x /usr/sbin/avahi-daemon-bridge-dsd ]; then
5255N/A echo "/usr/sbin/avahi-daemon-bridge-dsd not found or not executable"
5255N/A exit $SMF_EXIT_ERR_FATAL
5255N/Afi
5255N/A
5255N/Aif smf_is_nonglobalzone; then
5255N/A /usr/sbin/svcadm disable -t svc:/system/avahi-bridge-dsd
5255N/A echo "avahi-bridge-dsd cannot be run in non-global zones"
5255N/A sleep 5 &
5255N/A exit $SMF_EXIT_OK
5255N/Afi
5255N/A
5255N/Acase "$1" in
5255N/A'start')
5255N/A /usr/sbin/avahi-daemon-bridge-dsd -D
5255N/A err=$?
5255N/A if [ $err -ne 0 ]; then
5255N/A echo "avahi-daemon-bridge-dsd failed to start: error $err"
5255N/A exit $SMF_EXIT_ERR_FATAL
5255N/A fi
5255N/A ;;
5255N/A'stop')
5255N/A /usr/sbin/avahi-daemon-bridge-dsd -k
5255N/A ;;
5255N/A*)
5255N/A echo "Usage: $0 { start }"
5255N/A exit $SMF_EXIT_ERR_FATAL
5255N/A ;;
5255N/Aesac
5255N/A
5255N/Aexit $SMF_EXIT_OK