PSARC 2007/045 I2O EOL and EOF 4863632 Hey Hey! Ho Ho! I2O Has Got to Go!
1 #!/bin/sh 2 # 3 # CDDL HEADER START 4 # 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. 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 # 24 # Copyright 2007 Sun Microsystems, Inc. All rights reserved. 25 # Use is subject to license terms. 26 # 27 #ident "@(#)i.kclasses_i386 1.17 07/01/22 SMI" 28 # 29 30 PATH="/usr/bin:/usr/sbin:${PATH}" 31 export PATH 32 33 obsolete() 34 { 35 nawk 'BEGIN { 36 obs["chs"] = 1; 37 } !($1 in obs) {print $0}' 38 } 39 while read src dest 40 do 41 if [ ! -f $dest ] ; then 42 cp $src $dest 43 else 44 obsolete < $dest > /tmp/odc.$$.tmp 45 cp /tmp/odc.$$.tmp $dest 46 rm -f /dev/odc.$$.tmp 47 48 grep '^#pragma' $src > /tmp/newident.$$ 2>/dev/null 49 sed -e '/^aha[ ].*scsi/d' \ 50 -e '/^aic[ ].*scsi/d' \ 51 -e '/^blogic[ ].*scsi/d' \ 52 -e '/^cpqncr[ ].*scsi/d' \ 53 -e '/^csa[ ].*dada/d' \ 54 -e '/^csa[ ].*scsi/d' \ 55 -e '/^dpt[ ].*scsi/d' \ 56 -e '/^dsa[ ].*dada/d' \ 57 -e '/^[ ]*dsa[ ].*scsi/d' \ 58 -e '/^esa[ ].*scsi/d' \ 59 -e '/^eha[ ].*scsi/d' \ 60 -e '/^iss[ ].*scsi/d' \ 61 -e '/^mc[ ].*sysbus/d' \ 62 -e '/^mcis[ ].*scsi/d' \ 63 -e '/^mega[ ].*scsi/d' \ 64 -e '/^mlx[ ].*dada/d' \ 65 -e '/^smartii[ ].*dada/d' \ 66 -e '/^trantor[ ].*scsi/d' \ 67 -e '/^corvette[ ].*scsi/d' \ 68 -e '/^pci_to_i2o[ ].*i2o/d' \ 69 -e '/^i2o_scsi[ ].*scsi/d' \ 70 $dest > /tmp/c.$$ 71 if cmp -s /tmp/c.$$ $dest > /dev/null 2>&1 72 then 73 : 74 else 75 cat /tmp/newident.$$ > /tmp/rest.$$ 76 sed '/^#pragma.*/d' /tmp/c.$$ >> /tmp/rest.$$ 77 cp /tmp/rest.$$ $dest 78 fi 79 rm -f /tmp/rest.$$ /tmp/newident.$$ /tmp/c.$$ 80 81 grep '^pci[ ].*pci' $dest > /dev/null 2>&1 82 if [ $? != 0 ] ; then 83 echo 'pci pci' >> $dest 84 fi 85 grep '^pci_pci[ ].*pci' $dest > /dev/null 2>&1 86 if [ $? != 0 ] ; then 87 echo 'pci_pci pci' >> $dest 88 fi 89 grep '^mscsi[ ].*scsi' $dest > /dev/null 2>&1 90 if [ $? != 0 ] ; then 91 echo 'mscsi scsi' >> $dest 92 fi 93 grep '^mpt scsi' $dest > /dev/null 2>&1 94 if [ $? != 0 ] ; then 95 echo 'mpt scsi' >> $dest 96 fi 97 fi 98 done 99 100 exit 0 --- EOF ---