1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License, Version 1.0 only 6 # (the "License"). You may not use this file except in compliance 7 # with the License. 8 # 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. 13 # 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] 19 # 20 # CDDL HEADER END 21 # 22 # 23 # Copyright 1993-2002 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 #ident "%Z%%M% %I% %E% SMI" 27 28 # Remove the 'gk' account 29 echo "Removing 'gk' account" 30 ed $BASEDIR/etc/passwd <<EOF >/dev/null 31 1,\$g/^gk:/d 32 1,\$p 33 w 34 q 35 EOF 36 ed $BASEDIR/etc/shadow <<EOF >/dev/null 37 1,\$g/^gk:/d 38 1,\$p 39 w 40 q 41 EOF 42 43 # Remove gk's .make.machines file. 44 echo "Removing .make.machines"; 45 rm -f $BASEDIR/opt/onbld/gk/.make.machines > /dev/null 2>&1; 46 47 # Remove root's link to gk's .make.machines file. 48 /usr/bin/test -L $BASEDIR/.make.machines ; 49 if [ "$?" = "0" ]; then 50 rm -f $BASEDIR/.make.machines > /dev/null 2>&1; 51 fi 52 53 # Restore previous ~gk/.make.machines, if it exists. 54 mv $BASEDIR/opt/onbld/gk/.make.machines.orig \ 55 $BASEDIR/opt/onbld/gk/.make.machines > /dev/null 2>&1; 56 # Restore previous /.make.machines, if it exists. 57 mv $BASEDIR/.make.machines.orig $BASEDIR/.make.machines > /dev/null 2>&1; 58 exit 0; 59