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]
22 # Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 # Use is subject to license terms.
25 #pragma ident "%Z%%M% %I% %E% SMI"
29 # Script to wrap a non-windowing clean script to provide a prompt
30 # before the dtterm window closes, and to catch abnormal terminations.
32 # For any abnormal termination of the clean script, kill our parent
33 # process so that our grandparent will know that the script did not
34 # terminate normally. (We expect our parent to be dtterm, and our
35 # grandparent to be allocate.)
37 # Trap any signal that would cause abnormal termination of the script,
38 # This catches use of ^C, ^Z, etc., and it also catches the HUP signal
39 # when the dtterm window is closed before the script is finished.
44 if [ $PARENT_KILLED = "no" ]; then
50 trap "killparent" HUP INT TERM QUIT TSTP ABRT
55 if [ ! -e $SCRIPT ]; then
56 echo **** Clean
script $SCRIPT not found
****
57 echo "**** Press RETURN to close window ****"
62 echo "**** Device cleanup for $2 ****\n"
67 echo "\n**** Press RETURN to close window ****"
70 # If the script returned a non-zero exit status, kill our dtterm
73 if [ $STAT != 0 ]; then