i.kclasses_i386 revision 57f4a14abf7408570afb91750e10e4b57f721549
2N/A#!/bin/sh
2N/A#
2N/A# CDDL HEADER START
2N/A#
2N/A# The contents of this file are subject to the terms of the
2N/A# Common Development and Distribution License (the "License").
2N/A# You may not use this file except in compliance with the License.
2N/A#
2N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A# or http://www.opensolaris.org/os/licensing.
2N/A# See the License for the specific language governing permissions
2N/A# and limitations under the License.
2N/A#
2N/A# When distributing Covered Code, include this CDDL HEADER in each
2N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A# If applicable, add the following below this CDDL HEADER, with the
2N/A# fields enclosed by brackets "[]" replaced with your own identifying
2N/A# information: Portions Copyright [yyyy] [name of copyright owner]
2N/A#
2N/A# CDDL HEADER END
2N/A#
2N/A
2N/A#
2N/A# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2N/A# Use is subject to license terms.
2N/A#
2N/A
2N/APATH="/usr/bin:/usr/sbin:${PATH}"
2N/Aexport PATH
2N/A
2N/Aobsolete()
2N/A{
2N/A nawk 'BEGIN {
2N/A obs["chs"] = 1;
2N/A } !($1 in obs) {print $0}'
2N/A}
2N/Awhile read src dest
2N/Ado
2N/A if [ ! -f $dest ] ; then
2N/A cp $src $dest
2N/A else
2N/A obsolete < $dest > /tmp/odc.$$.tmp
2N/A cp /tmp/odc.$$.tmp $dest
2N/A rm -f /dev/odc.$$.tmp
2N/A
2N/A sed -e '/^aha[ ].*scsi/d' \
2N/A -e '/^aic[ ].*scsi/d' \
2N/A -e '/^blogic[ ].*scsi/d' \
2N/A -e '/^cpqncr[ ].*scsi/d' \
2N/A -e '/^csa[ ].*dada/d' \
2N/A -e '/^csa[ ].*scsi/d' \
2N/A -e '/^dpt[ ].*scsi/d' \
2N/A -e '/^dsa[ ].*dada/d' \
2N/A -e '/^[ ]*dsa[ ].*scsi/d' \
2N/A -e '/^esa[ ].*scsi/d' \
2N/A -e '/^eha[ ].*scsi/d' \
2N/A -e '/^iss[ ].*scsi/d' \
2N/A -e '/^mc[ ].*sysbus/d' \
2N/A -e '/^mcis[ ].*scsi/d' \
2N/A -e '/^mega[ ].*scsi/d' \
2N/A -e '/^mlx[ ].*dada/d' \
2N/A -e '/^mscsi[ ].*scsi/d' \
2N/A -e '/^smartii[ ].*dada/d' \
2N/A -e '/^trantor[ ].*scsi/d' \
2N/A -e '/^corvette[ ].*scsi/d' \
2N/A -e '/^pci_to_i2o[ ].*i2o/d' \
2N/A -e '/^i2o_scsi[ ].*scsi/d' \
2N/A $dest > /tmp/c.$$
2N/A cmp -s /tmp/c.$$ $dest > /dev/null 2>&1 ||
2N/A cp /tmp/c.$$ $dest
2N/A rm -f /tmp/c.$$
2N/A
2N/A grep '^pci[ ].*pci' $dest > /dev/null 2>&1
2N/A if [ $? != 0 ] ; then
2N/A echo 'pci pci' >> $dest
2N/A fi
2N/A grep '^pci_pci[ ].*pci' $dest > /dev/null 2>&1
2N/A if [ $? != 0 ] ; then
2N/A echo 'pci_pci pci' >> $dest
2N/A fi
2N/A grep '^mpt[ ].*scsi' $dest > /dev/null 2>&1
2N/A if [ $? != 0 ] ; then
2N/A echo 'mpt scsi' >> $dest
2N/A fi
2N/A grep '^scsi_vhci[ ].*scsi-self-identifying' $dest > /dev/null 2>&1
2N/A if [ $? != 0 ] ; then
2N/A echo 'scsi_vhci scsi-self-identifying' >> $dest
2N/A fi
2N/A fi
2N/Adone
2N/A
2N/Aexit 0
2N/A