postinstall revision c77a61a72b5ecdc507d6cf104142edd371a16c84
a69070d8fab55dbc63ba9f96c9d3e34f0ea9119aMark Andrews#!/bin/sh
3c5862dfc7718dc1c7ee402138de2227105f547cTinderbox User#
122230159d02eb8d947c3bb3f279469919c164c8Automatic Updater#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# CDDL HEADER START
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews#
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# The contents of this file are subject to the terms of the
a69070d8fab55dbc63ba9f96c9d3e34f0ea9119aMark Andrews# Common Development and Distribution License (the "License").
a69070d8fab55dbc63ba9f96c9d3e34f0ea9119aMark Andrews# You may not use this file except in compliance with the License.
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews#
a69070d8fab55dbc63ba9f96c9d3e34f0ea9119aMark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7318bbc26262a66a0d740ceefed769961ef7e476Evan Hunt# or http://www.opensolaris.org/os/licensing.
7318bbc26262a66a0d740ceefed769961ef7e476Evan Hunt# See the License for the specific language governing permissions
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews# and limitations under the License.
1b05d22789fd9a17aca4f459639bc2b6848c3160Mark Andrews#
1b05d22789fd9a17aca4f459639bc2b6848c3160Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4162d3b36d1a3c25724c7e37ce839f67b2352bbbMark Andrews# If applicable, add the following below this CDDL HEADER, with the
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
a69070d8fab55dbc63ba9f96c9d3e34f0ea9119aMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews#
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews# CDDL HEADER END
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews#
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
7318bbc26262a66a0d740ceefed769961ef7e476Evan Hunt#
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
a69070d8fab55dbc63ba9f96c9d3e34f0ea9119aMark Andrews# Use is subject to license terms.
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews#
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews# ident "%Z%%M% %I% %E% SMI"
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews#
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark AndrewsPATH="/usr/bin:/usr/sbin:${PATH}"
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewsexport PATH
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewsif [ "${BASEDIR:=/}" != "/" ]
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewsthen
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews BASEDIR_OPT="-b $BASEDIR"
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewsfi
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewsnot_installed() {
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews driver=$1
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews grep "^${driver} " $BASEDIR/etc/name_to_major > /dev/null 2>&1
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews return $?
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews}
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark AndrewsEXIT=0
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews# There are some Logitech webcams which are almost compliant to usb
a69070d8fab55dbc63ba9f96c9d3e34f0ea9119aMark Andrews# video class spec and can work on this driver, but they are not using
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews# usb video class name.
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews#046d:08c5 Logitech Quickcam Pro 5000 (some old versions)
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews#046d:08c3 Logitech Quickcam Pro for Notebooks
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews#046d:08c1 Logitech Quickcam Fusion (some old versions)
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews#046d:08c2 Logitech Quickcam Orbit MP
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark AndrewsUSBVC_ALIASES="\
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews \"usbia,classe\" \
1b05d22789fd9a17aca4f459639bc2b6848c3160Mark Andrews \"usbia46d,8c5.config1.0\" \
1b05d22789fd9a17aca4f459639bc2b6848c3160Mark Andrews \"usbia46d,8c3.config1.0\" \
1b05d22789fd9a17aca4f459639bc2b6848c3160Mark Andrews \"usbia46d,8c1.config1.0\" \
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews \"usbia46d,8c2.config1.0\" \
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews "
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewsnot_installed usbvc || add_drv ${BASEDIR_OPT} -m '* 0666 root sys' \
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews -i "${USBVC_ALIASES}" -n usbvc || EXIT=1
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrewsexit $EXIT
9198ab377b1cbf07d6d0c6eec25296c135bd66bdMark Andrews