i.kclasses_sparc revision 7c478bd95313f5f23a4c958a745db2134aa03244
286N/A#!/bin/sh
286N/A#
286N/A# CDDL HEADER START
286N/A#
286N/A# The contents of this file are subject to the terms of the
286N/A# Common Development and Distribution License, Version 1.0 only
286N/A# (the "License"). You may not use this file except in compliance
286N/A# with the License.
286N/A#
286N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
286N/A# or http://www.opensolaris.org/os/licensing.
286N/A# See the License for the specific language governing permissions
286N/A# and limitations under the License.
286N/A#
286N/A# When distributing Covered Code, include this CDDL HEADER in each
286N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
286N/A# If applicable, add the following below this CDDL HEADER, with the
286N/A# fields enclosed by brackets "[]" replaced with your own identifying
286N/A# information: Portions Copyright [yyyy] [name of copyright owner]
286N/A#
286N/A# CDDL HEADER END
286N/A#
286N/A#
286N/A#ident "%Z%%M% %I% %E% SMI"
286N/A#
293N/A# Copyright 2004 Sun Microsystems, Inc. All rights reserved.
293N/A# Use is subject to license terms.
286N/A#
293N/A
286N/APATH="/usr/bin:/usr/sbin:${PATH}"
286N/Aexport PATH
293N/A
286N/Aobsolete()
286N/A{
286N/A nawk 'BEGIN {
286N/A obs["xbox"] = 1;
286N/A obs["sbi"] = 1;
286N/A } !($1 in obs) {print $0}'
286N/A}
286N/Awhile read src dest
286N/Ado
286N/A if [ ! -f $dest ] ; then
286N/A cp $src $dest
286N/A else
286N/A obsolete < $dest > /tmp/odc.$$.tmp
286N/A cp /tmp/odc.$$.tmp $dest
286N/A rm -f /dev/odc.$$.tmp
286N/A
286N/A grep '^#ident[ ]*\"@(#)driver_classes' $src \
286N/A > /tmp/newident.$$ 2>/dev/null
286N/A sed -e '/^#ident[ ]*\"@(#)driver_classes.*$/d' \
286N/A -e '/^\"QLGC,isp\"[ ]*scsi$/d' \
286N/A -e '/^\"SUNW,isp\"[ ]*scsi$/d' \
286N/A -e '/^ncr[ ]*scsi$/d' \
286N/A -e '/^vme[ ]*vme$/d' \
286N/A -e '/^pci[ ]*pci$/d' \
286N/A $dest > /tmp/rest.$$ 2>/dev/null
286N/A cat /tmp/newident.$$ /tmp/rest.$$ > $dest
286N/A grep '^isp scsi' $dest > /dev/null 2>&1
286N/A if [ $? != 0 ] ; then
286N/A echo 'isp scsi' >> $dest
286N/A fi
286N/A grep '^pcipsy[ ].*pci' $dest > /dev/null 2>&1
286N/A if [ $? != 0 ] ; then
286N/A echo 'pcipsy pci' >> $dest
286N/A fi
286N/A grep '^pcisch[ ].*pci' $dest > /dev/null 2>&1
286N/A if [ $? != 0 ] ; then
286N/A echo 'pcisch pci' >> $dest
286N/A fi
286N/A grep '^pci_pci[ ].*pci' $dest > /dev/null 2>&1
286N/A if [ $? != 0 ] ; then
286N/A echo 'pci_pci pci' >> $dest
286N/A fi
286N/A grep '^fas[ ].*scsi' $dest > /dev/null 2>&1
286N/A if [ $? != 0 ] ; then
286N/A echo 'fas scsi' >> $dest
286N/A fi
286N/A grep '^ebus ebus' $dest > /dev/null 2>&1
286N/A if [ $? != 0 ] ; then
286N/A echo 'ebus ebus' >> $dest
286N/A fi
286N/A grep '^glm scsi' $dest > /dev/null 2>&1
286N/A if [ $? != 0 ] ; then
286N/A echo 'glm scsi' >> $dest
286N/A fi
286N/A grep '^uata dada' $dest > /dev/null 2>&1
286N/A if [ $? != 0 ] ; then
286N/A echo 'uata dada' >> $dest
286N/A fi
286N/A grep '^uata scsi' $dest > /dev/null 2>&1
293N/A if [ $? != 0 ] ; then
293N/A echo 'uata scsi' >> $dest
293N/A fi
286N/A grep '^simba[ ]*pci' $dest > /dev/null 2>&1
286N/A if [ $? != 0 ] ; then
286N/A echo 'simba pci' >> $dest
286N/A fi
286N/A grep '^mpt scsi' $dest > /dev/null 2>&1
286N/A if [ $? != 0 ] ; then
286N/A echo 'mpt scsi' >> $dest
286N/A fi
286N/A fi
286N/Adone
286N/Arm -f /tmp/newident.$$ /tmp/rest.$$
286N/A
286N/Aexit 0
286N/A