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 2008 Sun Microsystems, Inc. All rights reserved. 25 # Use is subject to license terms. 26 # 27 #ident "%Z%%M% %I% %E% 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 sed -e '/^aha[ ].*scsi/d' \ 49 -e '/^aic[ ].*scsi/d' \ 50 -e '/^blogic[ ].*scsi/d' \ 51 -e '/^cpqncr[ ].*scsi/d' \ 52 -e '/^csa[ ].*dada/d' \ 53 -e '/^csa[ ].*scsi/d' \ 54 -e '/^dpt[ ].*scsi/d' \ 55 -e '/^dsa[ ].*dada/d' \ 56 -e '/^[ ]*dsa[ ].*scsi/d' \ 57 -e '/^esa[ ].*scsi/d' \ 58 -e '/^eha[ ].*scsi/d' \ 59 -e '/^iss[ ].*scsi/d' \ 60 -e '/^mc[ ].*sysbus/d' \ 61 -e '/^mcis[ ].*scsi/d' \ 62 -e '/^mega[ ].*scsi/d' \ 63 -e '/^mlx[ ].*dada/d' \ 64 -e '/^smartii[ ].*dada/d' \ 65 -e '/^trantor[ ].*scsi/d' \ 66 -e '/^corvette[ ].*scsi/d' \ 67 -e '/^pci_to_i2o[ ].*i2o/d' \ 68 -e '/^i2o_scsi[ ].*scsi/d' \ 69 $dest > /tmp/c.$$ 70 cmp -s /tmp/c.$$ $dest > /dev/null 2>&1 || 71 cp /tmp/c.$$ $dest 72 rm -f /tmp/c.$$ 73 74 grep '^pci[ ].*pci' $dest > /dev/null 2>&1 75 if [ $? != 0 ] ; then 76 echo 'pci pci' >> $dest 77 fi 78 grep '^pci_pci[ ].*pci' $dest > /dev/null 2>&1 79 if [ $? != 0 ] ; then 80 echo 'pci_pci pci' >> $dest 81 fi 82 grep '^mscsi[ ].*scsi' $dest > /dev/null 2>&1 83 if [ $? != 0 ] ; then 84 echo 'mscsi scsi' >> $dest 85 fi 86 grep '^mpt[ ].*scsi' $dest > /dev/null 2>&1 87 if [ $? != 0 ] ; then 88 echo 'mpt scsi' >> $dest 89 fi 90 grep '^scsi_vhci[ ].*scsi-self-identifying' $dest > /dev/null 2>&1 91 if [ $? != 0 ] ; then 92 echo 'scsi_vhci scsi-self-identifying' >> $dest 93 fi 94 fi 95 done 96 97 exit 0 98