112016SGirish.Moodalbail@Sun.COM#!/sbin/sh 212016SGirish.Moodalbail@Sun.COM# 312016SGirish.Moodalbail@Sun.COM# CDDL HEADER START 412016SGirish.Moodalbail@Sun.COM# 512016SGirish.Moodalbail@Sun.COM# The contents of this file are subject to the terms of the 612016SGirish.Moodalbail@Sun.COM# Common Development and Distribution License (the "License"). 712016SGirish.Moodalbail@Sun.COM# You may not use this file except in compliance with the License. 812016SGirish.Moodalbail@Sun.COM# 912016SGirish.Moodalbail@Sun.COM# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 1012016SGirish.Moodalbail@Sun.COM# or http://www.opensolaris.org/os/licensing. 1112016SGirish.Moodalbail@Sun.COM# See the License for the specific language governing permissions 1212016SGirish.Moodalbail@Sun.COM# and limitations under the License. 1312016SGirish.Moodalbail@Sun.COM# 1412016SGirish.Moodalbail@Sun.COM# When distributing Covered Code, include this CDDL HEADER in each 1512016SGirish.Moodalbail@Sun.COM# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1612016SGirish.Moodalbail@Sun.COM# If applicable, add the following below this CDDL HEADER, with the 1712016SGirish.Moodalbail@Sun.COM# fields enclosed by brackets "[]" replaced with your own identifying 1812016SGirish.Moodalbail@Sun.COM# information: Portions Copyright [yyyy] [name of copyright owner] 1912016SGirish.Moodalbail@Sun.COM# 2012016SGirish.Moodalbail@Sun.COM# CDDL HEADER END 2112016SGirish.Moodalbail@Sun.COM# 2212016SGirish.Moodalbail@Sun.COM# 23*12897SBaban.Kenkre@Sun.COM# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 2412016SGirish.Moodalbail@Sun.COM# 2512016SGirish.Moodalbail@Sun.COM# This daemon stores address object to logical interface number mappings 2612016SGirish.Moodalbail@Sun.COM# (among other things) and reads/writes from/to ipmgmtd data store. 2712016SGirish.Moodalbail@Sun.COM# 2812016SGirish.Moodalbail@Sun.COM 2912016SGirish.Moodalbail@Sun.COM. /lib/svc/share/smf_include.sh 3012016SGirish.Moodalbail@Sun.COM 3112016SGirish.Moodalbail@Sun.COMif [ -z "$SMF_FMRI" ]; then 3212016SGirish.Moodalbail@Sun.COM echo "this script can only be invoked by smf(5)" 3312016SGirish.Moodalbail@Sun.COM exit $SMF_EXIT_ERR_NOSMF 3412016SGirish.Moodalbail@Sun.COMfi 3512016SGirish.Moodalbail@Sun.COM 3612016SGirish.Moodalbail@Sun.COM# 3712016SGirish.Moodalbail@Sun.COM# network/ip-interface-management:default service is always enabled by default. 3812016SGirish.Moodalbail@Sun.COM# When the non-global shared-IP stack zone boots, it tries to bring up this 3912016SGirish.Moodalbail@Sun.COM# service as well. If we don't start a background process and simply exit the 4012016SGirish.Moodalbail@Sun.COM# service, the service will go into maintenance mode and so will all it's 4112016SGirish.Moodalbail@Sun.COM# dependents. 4212016SGirish.Moodalbail@Sun.COM# 43*12897SBaban.Kenkre@Sun.COM# In S10C zone (where this script is also used) smf_isnonglobalzone 44*12897SBaban.Kenkre@Sun.COM# function is unavailable in smf_include.sh 45*12897SBaban.Kenkre@Sun.COM# 46*12897SBaban.Kenkre@Sun.COMif [ `/sbin/zonename` != global ]; then 4712016SGirish.Moodalbail@Sun.COM if [ `/sbin/zonename -t` = shared ]; then 4812016SGirish.Moodalbail@Sun.COM (while true ; do sleep 3600 ; done) & 4912016SGirish.Moodalbail@Sun.COM exit $SMF_EXIT_OK 5012016SGirish.Moodalbail@Sun.COM fi 5112016SGirish.Moodalbail@Sun.COMfi 5212016SGirish.Moodalbail@Sun.COM 5312016SGirish.Moodalbail@Sun.COM# 5412016SGirish.Moodalbail@Sun.COM# We must be now in a global zone or non-global zone with exclusive-IP stack. 5512016SGirish.Moodalbail@Sun.COM# Start the ipmgmtd daemon. 5612016SGirish.Moodalbail@Sun.COM# 5712016SGirish.Moodalbail@Sun.COMif /lib/inet/ipmgmtd ; then 5812016SGirish.Moodalbail@Sun.COM exit $SMF_EXIT_OK 5912016SGirish.Moodalbail@Sun.COMelse 6012016SGirish.Moodalbail@Sun.COM exit $SMF_EXIT_ERR_FATAL 6112016SGirish.Moodalbail@Sun.COMfi 62