dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / usr / src / cmd / cmd-inet / lib / ipmgmtd / net-ipmgmt
blob77b6be9f5467f8ee220117e8df6ec732bcbfbba8
1 #!/sbin/sh
3 # CDDL HEADER START
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License (the "License").
7 # You may not use this file except in compliance with the License.
9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 # or http://www.opensolaris.org/os/licensing.
11 # See the License for the specific language governing permissions
12 # and limitations under the License.
14 # When distributing Covered Code, include this CDDL HEADER in each
15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 # If applicable, add the following below this CDDL HEADER, with the
17 # fields enclosed by brackets "[]" replaced with your own identifying
18 # information: Portions Copyright [yyyy] [name of copyright owner]
20 # CDDL HEADER END
23 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
25 # This daemon stores address object to logical interface number mappings
26 # (among other things) and reads/writes from/to ipmgmtd data store.
29 . /lib/svc/share/smf_include.sh
31 if [ -z "$SMF_FMRI" ]; then
32 echo "this script can only be invoked by smf(5)"
33 exit $SMF_EXIT_ERR_NOSMF
37 # network/ip-interface-management:default service is always enabled by default.
38 # When the non-global shared-IP stack zone boots, it tries to bring up this
39 # service as well. If we don't start a background process and simply exit the
40 # service, the service will go into maintenance mode and so will all it's
41 # dependents.
43 # In S10C zone (where this script is also used) smf_isnonglobalzone
44 # function is unavailable in smf_include.sh
46 if [ `/sbin/zonename` != global ]; then
47 if [ `/sbin/zonename -t` = shared ]; then
48 (while true ; do sleep 3600 ; done) &
49 exit $SMF_EXIT_OK
54 # We must be now in a global zone or non-global zone with exclusive-IP stack.
55 # Start the ipmgmtd daemon.
57 if /lib/inet/ipmgmtd ; then
58 exit $SMF_EXIT_OK
59 else
60 exit $SMF_EXIT_ERR_FATAL