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