net-nwam revision b509e89b2befbaa42939abad9da1d7f5a8c6aaae
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# CDDL HEADER START
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# The contents of this file are subject to the terms of the
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# Common Development and Distribution License (the "License").
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# You may not use this file except in compliance with the License.
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# See the License for the specific language governing permissions
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# and limitations under the License.
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# When distributing Covered Code, include this CDDL HEADER in each
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# If applicable, add the following below this CDDL HEADER, with the
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# fields enclosed by brackets "[]" replaced with your own identifying
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# information: Portions Copyright [yyyy] [name of copyright owner]
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# CDDL HEADER END
b509e89b2befbaa42939abad9da1d7f5a8c6aaaeRishi Srivatsavai# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# Use is subject to license terms.
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# In a shared-IP zone we need this service to be up, but all of the work
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# it tries to do is irrelevant (and will actually lead to the service
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# failing if we try to do it), so just bail out.
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck# In the global zone and exclusive-IP zones we proceed.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz # Upgrade handling. The upgrade file consists of a series
d62bc4badc1c1f1549c961cfb8b420e650e1272byz # of dladm(1M) commands. Note that after we are done, we
d62bc4badc1c1f1549c961cfb8b420e650e1272byz # cannot rename the upgrade script file as the file system
d62bc4badc1c1f1549c961cfb8b420e650e1272byz # is still read-only at this point. Defer this to the
d62bc4badc1c1f1549c961cfb8b420e650e1272byz # manifest-import service.
d62bc4badc1c1f1549c961cfb8b420e650e1272byz if [ -f "${upgrade_script}" ]; then
d62bc4badc1c1f1549c961cfb8b420e650e1272byz . "${upgrade_script}"
b509e89b2befbaa42939abad9da1d7f5a8c6aaaeRishi Srivatsavai # Bring up simnet instances
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck # Initialize security objects.
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck # start nwamd in foreground; it will daemonize itself
afc7d54587eb70585fcc35b5f933cc1ed713d87amh # After we run this part of the script upon the next reboot
afc7d54587eb70585fcc35b5f933cc1ed713d87amh # network/physical:default will be enabled and
afc7d54587eb70585fcc35b5f933cc1ed713d87amh # network/physical:nwam will be disabled.
afc7d54587eb70585fcc35b5f933cc1ed713d87amh # There are various other parts of the system (nscd, nfs) that
afc7d54587eb70585fcc35b5f933cc1ed713d87amh # depend on continuing to have a working network. For this
afc7d54587eb70585fcc35b5f933cc1ed713d87amh # reason we don't change the network configuration immediately.
afc7d54587eb70585fcc35b5f933cc1ed713d87amh # Disable network/physical temporarily and make sure that will
afc7d54587eb70585fcc35b5f933cc1ed713d87amh # be enabled on reboot.
afc7d54587eb70585fcc35b5f933cc1ed713d87amh # If nwam is online then make sure that it's temporarily enabled.
afc7d54587eb70585fcc35b5f933cc1ed713d87amh nwam_online=`/usr/bin/svcprop -t -p restarter/state $net_nwam`
afc7d54587eb70585fcc35b5f933cc1ed713d87amh # Set nwam so that it won't be enabled upon reboot.
afc7d54587eb70585fcc35b5f933cc1ed713d87amh # Nothing to do for sysidtool
d71dbb732372504daff1f1783bc0d8864ce9bd50jbeck echo "Usage: $0 { start | stop | refresh }"