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