Mercurial > illumos > illumos-gate
view deleted_files/usr/src/pkgdefs/SUNWos86r/preinstall @ 3990:3dd39d80c307
6534519 SUNWos86r can blow away boot/solaris during upgrades leaving the machine unbootable in s10u4/snv_61
author | setje |
---|---|
date | Fri, 06 Apr 2007 16:49:11 -0700 |
parents | usr/src/pkgdefs/SUNWos86r/preinstall@68f95e015346 |
children |
line wrap: on
line source
#!/sbin/sh # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (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 # or http://www.opensolaris.org/os/licensing. # 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 (c) 1999 by Sun Microsystems, Inc. # All rights reserved. # #ident "%Z%%M% %I% %E% SMI" # # # If /boot/solaris/drivers directory doesn't exist but the old location # /platform/i86pc/boot is there, copy all the files to the new # location /boot and remove the old ones # OLDBOOT=/platform/i86pc/boot OLDBOOTDIR=${BASEDIR}${OLDBOOT} NEWBOOTDIR=${BASEDIR}/boot if [ ! -d ${NEWBOOTDIR}/solaris/drivers -a -d ${OLDBOOTDIR} ] ; then if [ ! -d ${NEWBOOTDIR} ] ; then mkdir -p $NEWBOOTDIR > /dev/null 2>&1 fi cd $OLDBOOTDIR find . -depth -print | cpio -pdm $NEWBOOTDIR >/dev/null 2>&1 fi exit 0