svc-ndp revision ceb97a6a3232437e1f0b4c6b8604bc1b4245ccc5
1268N/A#!/sbin/sh
1268N/A#
1268N/A# CDDL HEADER START
1268N/A#
1268N/A# The contents of this file are subject to the terms of the
1268N/A# Common Development and Distribution License (the "License").
1268N/A# You may not use this file except in compliance with the License.
1268N/A#
1268N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1268N/A# or http://www.opensolaris.org/os/licensing.
1268N/A# See the License for the specific language governing permissions
1268N/A# and limitations under the License.
1268N/A#
1268N/A# When distributing Covered Code, include this CDDL HEADER in each
1268N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1268N/A# If applicable, add the following below this CDDL HEADER, with the
1268N/A# fields enclosed by brackets "[]" replaced with your own identifying
1268N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1268N/A#
1268N/A# CDDL HEADER END
2899N/A#
1268N/A#
1268N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
1268N/A# Use is subject to license terms.
1268N/A#
1294N/A# ident "%Z%%M% %I% %E% SMI"
1268N/A
1268N/A. /lib/svc/share/smf_include.sh
1268N/A. /lib/svc/share/routing_include.sh
1268N/A
1294N/Asmf_is_globalzone || exit $SMF_EXIT_OK
1268N/A
1268N/Adaemon_args=`get_daemon_args $SMF_FMRI`
1268N/Aoptions="adtf:"
2899N/A
2899N/A#
1268N/A# Handle upgrade - routing/daemon-args property must be mapped to properties
1268N/A# in routeadm property group. Note that the SMF-incompatible -t option is not
1268N/A# supported, since it requires that in.ndpd run in the foreground.
1268N/A#
1268N/Aif [ -n "$daemon_args" ]; then
1294N/A set_daemon_boolean_property "$SMF_FMRI" "$daemon_args" \
1268N/A "$options" "a" stateless_addr_conf false true
1268N/A set_daemon_boolean_property "$SMF_FMRI" "$daemon_args" \
1268N/A "$options" "d" debug true false
1268N/A set_daemon_value_property "$SMF_FMRI" "$daemon_args" \
1268N/A "$options" "f" config_file
1475N/A clear_daemon_args $SMF_FMRI
1475N/Afi
1268N/A
1268N/A#
1268N/A# Assemble arguments to daemon from properties
1268N/A#
1268N/Aargs="`get_daemon_option_from_boolean_property $SMF_FMRI stateless_addr_conf \
1268N/A a false`"
1268N/Aargs="$args`get_daemon_option_from_boolean_property $SMF_FMRI debug d true`"
1268N/Aif [ -n "$args" ]; then
1268N/A args="-${args}"
fi
args="$args `get_daemon_option_from_property $SMF_FMRI config_file f`"
/usr/lib/inet/in.ndpd $args
[ "$?" = 0 ] || exit $SMF_EXIT_ERR_FATAL
exit $SMF_EXIT_OK