Print this page
NEX-6513 IPMP should be a proper service and not require manual daemon startup
Reviewed by: Steve Peng <steve.peng@nexenta.com>
Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/cmd/svc/milestone/net-init
+++ new/usr/src/cmd/svc/milestone/net-init
1 1 #!/sbin/sh
2 2 #
3 3 # CDDL HEADER START
4 4 #
5 5 # The contents of this file are subject to the terms of the
6 6 # Common Development and Distribution License (the "License").
7 7 # You may not use this file except in compliance with the License.
8 8 #
9 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 10 # or http://www.opensolaris.org/os/licensing.
11 11 # See the License for the specific language governing permissions
12 12 # and limitations under the License.
13 13 #
14 14 # When distributing Covered Code, include this CDDL HEADER in each
15 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 16 # If applicable, add the following below this CDDL HEADER, with the
17 17 # fields enclosed by brackets "[]" replaced with your own identifying
18 18 # information: Portions Copyright [yyyy] [name of copyright owner]
19 19 #
20 20 # CDDL HEADER END
21 21 #
22 22 #
23 23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 24 # Use is subject to license terms.
25 25 #
26 26 # This is the second phase of TCP/IP configuration. The first part is
27 27 # run by the svc:/network/physical service and includes configuring the
28 28 # interfaces and setting the machine's hostname. The svc:/network/initial
29 29 # service does all configuration that can be done before name services are
30 30 # started, bar configuring IP routing (this is carried out by the
31 31 # svc:/network/routing-setup service). The final part, run by the
32 32 # svc:/network/service service, does all configuration that may require
33 33 # name services. This includes a final re-configuration of the
34 34 # interfaces.
35 35 #
36 36
37 37 . /lib/svc/share/smf_include.sh
38 38
39 39 #
40 40 # In a shared-IP zone we need this service to be up, but all of the work
41 41 # it tries to do is irrelevant (and will actually lead to the service
42 42 # failing if we try to do it), so just bail out.
|
↓ open down ↓ |
42 lines elided |
↑ open up ↑ |
43 43 # In the global zone and exclusive-IP zones we proceed.
44 44 #
45 45 smf_configure_ip || exit $SMF_EXIT_OK
46 46
47 47 # Configure IPv6 Default Address Selection.
48 48 if [ -f /etc/inet/ipaddrsel.conf ]; then
49 49 /usr/sbin/ipaddrsel -f /etc/inet/ipaddrsel.conf
50 50 fi
51 51
52 52 #
53 -# If explicit IPMP groups are being used, in.mpathd will already be started.
54 -# However, if TRACK_INTERFACES_ONLY_WITH_GROUPS=no and no explicit IPMP
55 -# groups have been configured, then it still needs to be started. So, fire
56 -# it up in "adopt" mode; if there are no interfaces it needs to manage, it
57 -# will automatically exit.
58 -#
59 -/usr/bin/pgrep -x -u 0 -z `smf_zonename` in.mpathd >/dev/null 2>&1 || \
60 - /usr/lib/inet/in.mpathd -a
61 -
62 -#
63 53 # Set the RFC 1948 entropy, regardless of if I'm using it or not. If present,
64 54 # use the encrypted root password as a source of entropy. Otherwise,
65 55 # just use the pre-set (and hopefully difficult to guess) entropy that
66 56 # tcp used when it loaded.
67 57 #
68 58 encr=`/usr/bin/awk -F: '/^root:/ {print $2}' /etc/shadow`
69 59 [ -z "$encr" ] || /usr/sbin/ndd -set /dev/tcp tcp_1948_phrase $encr
70 60 unset encr
71 61
72 62 # Set the SDP system Policy. This needs to happen after basic
73 63 # networking is up but before any networking services that might
74 64 # want to use SDP are enabled
75 65 if [ -f /usr/sbin/sdpadm -a -f /etc/sdp.conf ]; then
76 66 . /etc/sdp.conf
77 67 if [ "$sysenable" = "1" ]; then
78 68 /usr/sbin/sdpadm enable
79 69 fi
80 70 fi
81 71
82 72 #
83 73 # Set TCP ISS generation. By default the ISS generation is
84 74 # time + random()-delta. This might not be strong enough for some users.
85 75 # See /etc/default/inetinit for settings and further info on TCP_STRONG_ISS.
86 76 # If not set, use TCP's internal default setting.
87 77 #
88 78 [ -f /etc/default/inetinit ] && . /etc/default/inetinit
89 79 if [ $TCP_STRONG_ISS ]; then
90 80 /usr/sbin/ndd -set /dev/tcp tcp_strong_iss $TCP_STRONG_ISS
91 81 fi
92 82
93 83 # Clear exit status.
94 84 exit $SMF_EXIT_OK
|
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX