OpenSolaris_b135/pkgdefs/common_files/i.devlinktab_sparc

#!/bin/sh
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (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 2009 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#

PATH="/usr/bin:/usr/sbin:${PATH}"
export PATH

while read src dest
do
	if [ ! -f $dest ] ; then
		cp $src $dest
	else
		sed -e '/^type=ddi_pseudo;name=app	/d' \
		    -e '/^type=ddi_pseudo;name=sw	/d' \
		    -e '/^type=ddi_pseudo;name=consfb;minor=consfb	/d' \
		    -e '/^type=ddi_pseudo;name=win	/d' \
		    -e '/^type=ddi_pseudo;name=winlock	/d' \
		    -e '/^type=ddi_pseudo;name=mm	/d' \
		    -e '/^type=ddi_pseudo;name=conskbd	/d' \
		    -e '/^type=ddi_pseudo;name=consms	/d' \
		    -e '/^type=ddi_pseudo;name=wc	/d' \
		    -e '/^type=ddi_pseudo;name=dump	/d' \
		    -e '/^type=ddi_pseudo;name=cn	/d' \
		    -e '/^type=ddi_pseudo;name=lo	/d' \
		    -e '/^type=ddi_pseudo;name=ptm	/d' \
		    -e '/^type=ddi_pseudo;name=ptc	/d' \
		    -e '/^type=ddi_pseudo;name=pts	/d' \
		    -e '/^type=ddi_pseudo;name=ptsl	/d' \
		    -e '/^type=ddi_pseudo;name=log	/d' \
		    -e '/^type=ddi_pseudo;name=sad	/d' \
		    -e '/^type=ddi_pseudo;name=sy	/d' \
		    -e '/^type=ddi_pseudo;name=clone	/d' \
		    -e '/^type=ddi_network	/d' \
		    -e '/^type=ddi_pseudo;name=openeepr	/d' \
		    -e '/^type=ddi_pseudo;name=lockstat	/d' \
		    -e '/^type=ddi_pseudo;name=kstat	/d' \
		    -e '/^type=ddi_pseudo;name=ksyms	/d' \
		    -e '/^type=ddi_display	/d' \
		    -e '/^type=ddi_pseudo;name=clone;minor=icmp	/d' \
		    -e '/^type=ddi_pseudo;name=SUNW,bpp	/d' \
		    -e '/^type=ddi_pseudo;name=eeprom	/d' \
		    -e '/^type=ddi_pseudo;name=clone;minor=ipdcm	/d' \
		    -e '/^type=ddi_pseudo;name=vol	/d' \
		    -e '/^type=ddi_pseudo;name=profile	/d' \
		    -e '/^type=ddi_parallel;name=mcpp	/d' \
		    -e '/^type=ddi_pseudo;name=zsh	/d' \
		    -e '/^type=ddi_pseudo;name=clone;minor=zsh	/d' \
		    -e '/^type=ddi_pseudo;name=SUNW,sx	/d' \
		    -e '/^type=ddi_pseudo;name=sx_cmem	/d' \
		    -e '/^type=ddi_parallel;name=SUNW,spif;minor=stclp	/d' \
		    -e '/^type=ddi_pseudo;name=SUNW,spif;minor=stc	/d' \
		    -e '/^type=ddi_pseudo;name=tl;minor=ticots	/d' \
		    -e '/^type=ddi_pseudo;name=tl;minor=ticotsord	/d' \
		    -e '/^type=ddi_pseudo;name=tl;minor=ticlts	/d' \
		    -e '/^type=ddi_pseudo;name=md;minor=admin	/d' \
		    -e '/^type=ddi_pseudo;name=md;minor2=blk	/d' \
		    -e '/^type=ddi_pseudo;name=md;minor2=raw	/d' \
		    -e '/^type=ddi_pseudo;name=tnf	/d' \
		    -e '/^type=ddi_pseudo;name=pm	/d' \
		    -e '/^type=ddi_block:diskette;minor=c	/d' \
		    -e '/^type=ddi_block:diskette;minor=c,raw	/d' \
		    -e '/^type=ddi_block:diskette;minor=c	/d' \
		    -e '/^type=ddi_block:diskette;minor=c,raw	/d' \
		    -e '/^type=ddi_pseudo;name=tod	/d' \
		    -e '/^type=ddi_other;name=SUNW,pmc	/d' \
		    -e '/^type=ddi_other;name=SUNW,mic	/d' \
		    -e '/^type=ddi_pseudo;name=SUNW,envctrl	/d' \
		    -e '/^type=ddi_other;name=power	/d' \
		    -e '/^type=ddi_pseudo;name=SUNW,envctrltwo	/d' \
		    -e '/^type=ddi_pseudo;name=ecpp	/d' \
		    -e '/^type=ddi_pseudo;name=se	/d' \
		    -e '/^type=ddi_nexus;minor=initpcmcia	/d' \
                    -e '/^type=ddi_nexus:devctl;minor=initpcmcia	/d' \
                    -e '/^type=ddi_nexus:devctl;minor=probepcmcia	/d' \
                    -e '/^type=ddi_ctl:devctl;minor=initpcmcia	/d' \
                    -e '/^type=ddi_ctl:devctl;minor=probepcmcia	/d' \
                    -e '/^type=pcmcia:event;name=pem	/d' \
		    -e 's,sys/obpdefs.h,<sys/sunddi.h>,' $dest > /tmp/d.$$
		cp /tmp/d.$$ $dest
		rm -f /tmp/d.$$
	fi
done

exit 0