preremove revision d73ae94e59c019f5cc3221ee0a0012d02091b40e
1057N/A#! /bin/sh
1057N/A#
1057N/A# CDDL HEADER START
1057N/A#
1589N/A# The contents of this file are subject to the terms of the
1057N/A# Common Development and Distribution License (the "License").
660N/A# You may not use this file except in compliance with the License.
1057N/A#
1057N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1057N/A# or http://www.opensolaris.org/os/licensing.
1057N/A# See the License for the specific language governing permissions
1057N/A# and limitations under the License.
1057N/A#
1057N/A# When distributing Covered Code, include this CDDL HEADER in each
1057N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1057N/A# If applicable, add the following below this CDDL HEADER, with the
1057N/A# fields enclosed by brackets "[]" replaced with your own identifying
1057N/A# information: Portions Copyright [yyyy] [name of copyright owner]
1057N/A#
1057N/A# CDDL HEADER END
660N/A#
2437N/A#
1109N/A# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
2506N/A# Use is subject to license terms.
2557N/A#
2557N/A#pragma ident "%Z%%M% %I% %E% SMI"
2557N/A#
2437N/A
2437N/APATH="/usr/bin:/usr/sbin:${PATH}"
2437N/Aexport PATH
2437N/A
2543N/Ainstalled() {
2543N/A driver=$1
2557N/A grep "^${driver} " $BASEDIR/etc/name_to_major > /dev/null 2>&1
2557N/A
2557N/A return $?
2557N/A}
2557N/A
2557N/AEXIT=0
2557N/A
2557N/Aif installed hid
2557N/Athen
2557N/A rem_drv -b ${BASEDIR} hid || EXIT=1
2557N/Afi
2557N/A
2557N/Aif installed hubd
2557N/Athen
2437N/A rem_drv -b ${BASEDIR} hubd || EXIT=1
2557N/Afi
2557N/A
2557N/Aif installed usb_ia
2557N/Athen
2557N/A rem_drv -b ${BASEDIR} usb_ia || EXIT=1
2557N/Afi
2557N/A
2557N/Aif installed usb_mid
2557N/Athen
2557N/A rem_drv -b ${BASEDIR} usb_mid || EXIT=1
2557N/Afi
2557N/A
2437N/Aif installed scsa2usb
2437N/Athen
2437N/A rem_drv -b ${BASEDIR} scsa2usb || EXIT=1
2506N/Afi
2506N/A
2557N/Aif installed usbprn
2095N/Athen
2095N/A rem_drv -b ${BASEDIR} usbprn || EXIT=1
2095N/Afi
2557N/A
2437N/Aif installed usb_ac
2437N/Athen
2437N/A rem_drv -b ${BASEDIR} usb_ac || EXIT=1
2557N/Afi
2437N/A
2437N/Aif installed usb_as
2437N/Athen
2437N/A rem_drv -b ${BASEDIR} usb_as || EXIT=1
2506N/Afi
2506N/A
2557N/Aif installed ohci
2095N/Athen
2095N/A rem_drv -b ${BASEDIR} ohci || EXIT=1
2095N/Afi
2557N/A
2095N/Aif installed ehci
2095N/Athen
2095N/A #
2557N/A # Only rem_drv ehci if there are no user-defined aliases
2095N/A # Be careful about the egrep [ ] regexp - it should be
2095N/A # [<SAPCE><TAB>]
2095N/A #
2557N/A
2557N/A egrep "^ehci[ ]" $BASEDIR/etc/driver_aliases | \
2557N/A grep -v "pciclass,0c0320" > /dev/null 2>&1
2557N/A
2557N/A if [ $? -eq 1 ]; then
2557N/A rem_drv -b ${BASEDIR} ehci || EXIT=1
2557N/A fi
2557N/Afi
2557N/A
2095N/Aif installed uhci
2095N/Athen
2095N/A rem_drv -b ${BASEDIR} uhci || EXIT=1
2095N/Afi
2095N/A
2437N/Aexit $EXIT
2506N/A