postinstall revision c77a61a72b5ecdc507d6cf104142edd371a16c84
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher#!/bin/sh
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher#
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher#
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# CDDL HEADER START
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher#
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# The contents of this file are subject to the terms of the
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# Common Development and Distribution License (the "License").
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# You may not use this file except in compliance with the License.
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher#
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# or http://www.opensolaris.org/os/licensing.
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# See the License for the specific language governing permissions
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# and limitations under the License.
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher#
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# When distributing Covered Code, include this CDDL HEADER in each
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# If applicable, add the following below this CDDL HEADER, with the
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# fields enclosed by brackets "[]" replaced with your own identifying
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# information: Portions Copyright [yyyy] [name of copyright owner]
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher#
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# CDDL HEADER END
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher#
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher#
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher# Use is subject to license terms.
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher#
e3c99ae355408933b03357220f3db09423bd40ddJakub Hrozek# ident "%Z%%M% %I% %E% SMI"
e3c99ae355408933b03357220f3db09423bd40ddJakub Hrozek#
e3c99ae355408933b03357220f3db09423bd40ddJakub Hrozek
5a5c5cdeb92f4012fc75fd717bfea06598f68f12Pavel ReichlPATH="/usr/bin:/usr/sbin:${PATH}"
7a4e3e29196e3abc1746714fcf93624edae89f93Lukas Slebodnikexport PATH
5a5c5cdeb92f4012fc75fd717bfea06598f68f12Pavel Reichl
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagherif [ "${BASEDIR:=/}" != "/" ]
dbea04f585a30d001b574317c068cd03a4fa332bJakub Hrozekthen
5a70b84cb66fb8c7a3fce0e3f2e4b61e0b2ea9d4Simo Sorce BASEDIR_OPT="-b $BASEDIR"
4139a7a731f2831963a42b26aac111422be28792Jakub Hrozekfi
dbd09f5703d721a58210e490609cfacb7eb56fcfStephen Gallagher
e3c99ae355408933b03357220f3db09423bd40ddJakub Hrozeknot_installed() {
e3c99ae355408933b03357220f3db09423bd40ddJakub Hrozek driver=$1
e3c99ae355408933b03357220f3db09423bd40ddJakub Hrozek grep "^${driver} " $BASEDIR/etc/name_to_major > /dev/null 2>&1
e3c99ae355408933b03357220f3db09423bd40ddJakub Hrozek
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose return $?
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose}
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit BoseEXIT=0
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose# There are some Logitech webcams which are almost compliant to usb
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose# video class spec and can work on this driver, but they are not using
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose# usb video class name.
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose#046d:08c5 Logitech Quickcam Pro 5000 (some old versions)
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose#046d:08c3 Logitech Quickcam Pro for Notebooks
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose#046d:08c1 Logitech Quickcam Fusion (some old versions)
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose#046d:08c2 Logitech Quickcam Orbit MP
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit BoseUSBVC_ALIASES="\
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose \"usbia,classe\" \
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose \"usbia46d,8c5.config1.0\" \
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose \"usbia46d,8c3.config1.0\" \
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose \"usbia46d,8c1.config1.0\" \
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose \"usbia46d,8c2.config1.0\" \
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose "
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bosenot_installed usbvc || add_drv ${BASEDIR_OPT} -m '* 0666 root sys' \
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose -i "${USBVC_ALIASES}" -n usbvc || EXIT=1
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Boseexit $EXIT
032d0980dfe5a27a5954f44f9d519e03fc7d1cedSumit Bose