svc-zones revision 7c478bd95313f5f23a4c958a745db2134aa03244
1690N/A# The contents of this file are subject to the terms of the 1690N/A# Common Development and Distribution License, Version 1.0 only 1690N/A# (the "License"). You may not use this file except in compliance 1690N/A# See the License for the specific language governing permissions 1690N/A# and limitations under the License. 1690N/A# When distributing Covered Code, include this CDDL HEADER in each 1690N/A# If applicable, add the following below this CDDL HEADER, with the 1690N/A# fields enclosed by brackets "[]" replaced with your own identifying 1690N/A# information: Portions Copyright [yyyy] [name of copyright owner] 1690N/A# Copyright 2004 Sun Microsystems, Inc. All rights reserved. 1690N/A# Use is subject to license terms. 1690N/A# ident "%Z%%M% %I% %E% SMI" 1690N/A# Make sure working directory is / to prevent unmounting problems. 1813N/A # We don't (yet) support restart for zones, so 1690N/A # we need to get all of the zones stuff off into 1690N/A MAXSHUT=
60 # maximum time we'll wait for all zones to shutdown 1690N/A echo "Shutting down running zones:\c" 1690N/A # First, try letting them run their shutdown scripts. 1858N/A # Allow time for zones to shutdown cleanly 1690N/A # Second, try halting them. 1690N/A echo "Zones failed to shutdown; trying to halt:\c" 1690N/A # Wait for the 'zoneadm halt' commands to complete. We will let this 1690N/A # run forever, since the restart daemon will eventually kill us off 1690N/A # anyway if the halts do not complete after a certain period of time. 1690N/A # If the halts complete but a zone is still not shutdown, it might 1690N/A # be in a state like 'shutting_down' or 'down'. So we give it some 2086N/A # time to come all the way down. 1690N/A # Report on zones which failed to shutdown. 1690N/A echo "Usage: $0 { start | stop }"