13048Samaguire#!/sbin/sh 23048Samaguire# 33048Samaguire# CDDL HEADER START 43048Samaguire# 53048Samaguire# The contents of this file are subject to the terms of the 63048Samaguire# Common Development and Distribution License (the "License"). 73048Samaguire# You may not use this file except in compliance with the License. 83048Samaguire# 93048Samaguire# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 103048Samaguire# or http://www.opensolaris.org/os/licensing. 113048Samaguire# See the License for the specific language governing permissions 123048Samaguire# and limitations under the License. 133048Samaguire# 143048Samaguire# When distributing Covered Code, include this CDDL HEADER in each 153048Samaguire# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 163048Samaguire# If applicable, add the following below this CDDL HEADER, with the 173048Samaguire# fields enclosed by brackets "[]" replaced with your own identifying 183048Samaguire# information: Portions Copyright [yyyy] [name of copyright owner] 193048Samaguire# 203048Samaguire# CDDL HEADER END 213048Samaguire# 223048Samaguire# 233448Sdh155122# Copyright 2007 Sun Microsystems, Inc. All rights reserved. 243048Samaguire# Use is subject to license terms. 253048Samaguire# 263048Samaguire# ident "%Z%%M% %I% %E% SMI" 273048Samaguire 283048Samaguire. /lib/svc/share/smf_include.sh 293048Samaguire. /lib/svc/share/routing_include.sh 303048Samaguire 313448Sdh155122smf_configure_ip || exit $SMF_EXIT_OK 323048Samaguire 333048Samaguiredaemon_args=`get_daemon_args $SMF_FMRI` 343048Samaguireoptions="sqp:Ptv" 353048Samaguire 363048Samaguire# 373048Samaguire# Handle upgrade - routing/daemon-args property must be mapped to properties 383048Samaguire# in routeadm property group. Note the SMF-incompatible -t option is not 393048Samaguire# supported, since it requires that in.ripngd run in the foreground. 403048Samaguire# 413048Samaguireif [ -n "$daemon_args" ]; then 423048Samaguire set_daemon_boolean_property "$SMF_FMRI" "$daemon_args" \ 43*3541Samaguire "$options" "q" quiet_mode true false 443048Samaguire set_daemon_boolean_property "$SMF_FMRI" "$daemon_args" \ 45*3541Samaguire "$options" "s" supply_routes true false 463048Samaguire set_daemon_value_property "$SMF_FMRI" "$daemon_args" \ 473048Samaguire "$options" "p" udp_port 521 483048Samaguire set_daemon_boolean_property "$SMF_FMRI" "$daemon_args" \ 493048Samaguire "$options" "P" poison_reverse false true 503048Samaguire set_daemon_boolean_property "$SMF_FMRI" "$daemon_args" \ 513048Samaguire "$options" "v" verbose true false 523048Samaguire set_daemon_nonoption_properties "$SMF_FMRI" "$daemon_args" \ 533048Samaguire "$options" "log_file" 543048Samaguire clear_daemon_args $SMF_FMRI 553048Samaguirefi 563048Samaguire 573048Samaguire# 583048Samaguire# Assemble arguments to daemon from properties 593048Samaguire# 603048Samaguireargs="`get_daemon_option_from_boolean_property $SMF_FMRI \ 61*3541Samaguire quiet_mode -q true`" 623048Samaguireargs="$args `get_daemon_option_from_boolean_property $SMF_FMRI \ 633048Samaguire supply_routes -s true`" 643048Samaguireargs="$args `get_daemon_option_from_property $SMF_FMRI udp_port p 521`" 653048Samaguireargs="$args `get_daemon_option_from_boolean_property $SMF_FMRI \ 663048Samaguire poison_reverse -P false`" 673048Samaguireargs="$args `get_daemon_option_from_boolean_property $SMF_FMRI \ 683048Samaguire verbose -v true`" 693048Samaguireargs="$args `get_daemon_nonoption_property $SMF_FMRI log_file`" 703048Samaguire 713048Samaguire/usr/lib/inet/in.ripngd $args 723048Samaguire 733048Samaguire[ "$?" = 0 ] || exit $SMF_EXIT_ERR_FATAL 743048Samaguire 753048Samaguireexit "$SMF_EXIT_OK" 76