6901121 assertion failed: hubd->h_intr_pipe_state == HUBD_INTR_PIPE_ACTIVE
[unleashed.git] / usr / src / pkgdefs / SUNWpcmci / postinstall
blobf391bb5bb9f5c07f6fff9ffeb3e9b68570d62eab
1 #! /bin/sh
3 # CDDL HEADER START
5 # The contents of this file are subject to the terms of the
6 # Common Development and Distribution License, Version 1.0 only
7 # (the "License"). You may not use this file except in compliance
8 # with the License.
10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11 # or http://www.opensolaris.org/os/licensing.
12 # See the License for the specific language governing permissions
13 # and limitations under the License.
15 # When distributing Covered Code, include this CDDL HEADER in each
16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
17 # If applicable, add the following below this CDDL HEADER, with the
18 # fields enclosed by brackets "[]" replaced with your own identifying
19 # information: Portions Copyright [yyyy] [name of copyright owner]
21 # CDDL HEADER END
24 #pragma ident "%Z%%M% %I% %E% SMI"
26 # Copyright (c) 1999,2001 by Sun Microsystems, Inc.
27 # All rights reserved.
30 PATH=/usr/bin:/usr/sbin:${PATH}
31 export PATH
33 EXIT=0
35 DEVLINKTB=${BASEDIR}/etc/devlink.tab
37 TMP=/tmp/$$
40 # add_devlink - adds an entry to ${DEVLINKTB}
42 add_devlink()
44 PATTERN="$1"
45 LINK="$2"
46 PLINK="`echo $LINK | sed 's/[$*^|\]/\\\&/g'`"
47 grep -v "^$PATTERN $PLINK$" ${DEVLINKTB} >$TMP.devlink
48 echo "$PATTERN\t$LINK" >>$TMP.devlink
49 cp $TMP.devlink ${DEVLINKTB}
50 rm -f $TMP.devlink
53 grep '^pcs\>' ${BASEDIR}/etc/name_to_major > /dev/null && \
54 rem_drv -b ${BASEDIR} pcs
55 add_drv -b ${BASEDIR} -n pcs \
56 || EXIT=1
58 case "${ARCH}" in
59 sparc)
60 grep '^stp4020\>' ${BASEDIR}/etc/name_to_major > /dev/null && \
61 rem_drv -b ${BASEDIR} stp4020
62 add_drv -b ${BASEDIR} -n -i 'SUNW,pcmcia' -c 'pcmcia' stp4020 \
63 || EXIT=1
65 esac
67 grep '^pcic\>' ${BASEDIR}/etc/name_to_major > /dev/null && \
68 rem_drv -b ${BASEDIR} pcic
69 add_drv -b ${BASEDIR} -n -c 'pcmcia' \
70 -i '"pciclass,060500" "pciclass,060700"' pcic \
71 || EXIT=1
72 grep '^pem\>' ${BASEDIR}/etc/name_to_major > /dev/null && \
73 rem_drv -b ${BASEDIR} pem
74 add_drv -b ${BASEDIR} -n -m '* 0666 bin bin' pem \
75 || EXIT=1
78 # PCI-PCMCIA (generic) bridge PCI class codes
80 add_devlink 'type=pcmcia:event;name=pem' 'pem'
82 exit ${EXIT}