net-init revision f4b3ec61df05330d25f55a36b975b4d7519fdeb1
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
#
# service does all configuration that can be done before name services are
# started, bar configuring IP routing (this is carried out by the
# svc:/network/routing-setup service). The final part, run by the
# name services. This includes a final re-configuration of the
# interfaces.
#
#
# In a shared-IP zone we need this service to be up, but all of the work
# it tries to do is irrelevant (and will actually lead to the service
# failing if we try to do it), so just bail out.
# In the global zone and exclusive-IP zones we proceed.
#
smf_configure_ip || exit $SMF_EXIT_OK
# Configure IPv6 Default Address Selection.
fi
#
# Now that /usr is mounted, see if in.mpathd needs to be started by firing it
# up in "adopt" mode; if there are no interfaces it needs to manage, it will
# automatically exit. Note that it may already be running if we're not
# executing as part of system boot.
#
#
# Pass to the kernel the list of supported IPsec protocols and algorithms.
# This will not cause IPsec to be loaded.
#
#
# Initialize IPsec only if ipsecinit.conf exists. Otherwise, save the
# kernel memory that'll be consumed if IPsec is loaded. See below for more
# IPsec-related commands.
#
fi
#
# Set the RFC 1948 entropy, regardless of if I'm using it or not. If present,
# use the encrypted root password as a source of entropy. Otherwise,
# just use the pre-set (and hopefully difficult to guess) entropy that
# tcp used when it loaded.
#
unset encr
#
# Get values for TCP_STRONG_ISS, ACCEPT6TO4RELAY and RELAY6TO4ADDR.
#
#
# Set TCP ISS generation. By default the ISS generation is
# time + random()-delta. This might not be strong enough for some users.
# If not set, use TCP's internal default setting.
#
if [ $TCP_STRONG_ISS ]; then
fi
#
# In spite of global policy, there may be a need for IPsec because of
# per-socket policy or tunnelled policy. With that in mind, check for manual
# thereby consuming kernel memory.
#
fi
fi
#
# Configure tunnels which were deferred by /lib/svc/method/net-physical
# being reachable i.e. routing must be running.
#
# WARNING: you may wish to turn OFF forwarding if you haven't already, because
# of various possible security vulnerabilities when configuring tunnels for
# Virtual Private Network (VPN) construction.
#
# Also, if names are used in the /etc/hostname.ip.tun* file, those names
# file is executed before NIS or NIS+ is started.
#
#
# IPv4 tunnels
# The second component of the name must be either "ip" or "ip6".
#
if [ -n "$interface_names" ]; then
(
echo "configuring IPv4 tunnels:\c"
# Extract the part after the first '.'
set -- `for intr in $interface_names; do \
while [ $# -ge 1 ]; do
# Skip empty files
shift
continue
fi
while read ifcmds; do
fi
echo " $1\c"
shift
done
echo "."
)
fi
#
# IPv6 Tunnels
# The second component of the name must be either "ip" or "ip6".
#
if [ -n "$interface_names" ]; then
(
echo "configuring IPv6 tunnels:\c"
# Extract the part after the first '.'
set -- `for intr in $interface_names; do \
while [ $# -ge 1 ]; do
# Skip empty files
shift
continue
fi
while read ifcmds; do
fi
echo " $1\c"
shift
done
echo "."
)
fi
# Clear exit status.
exit $SMF_EXIT_OK