#!/bin/sh # # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License, Version 1.0 only # (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 # # #pragma ident "%Z%%M% %I% %E% SMI" # # Copyright 2005 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # PATH="/usr/bin:/usr/sbin:${PATH}" export PATH if [ "${BASEDIR:=/}" != "/" ] then BASEDIR_OPT="-b $BASEDIR" fi # In addition to the list of aliases in USBSER_EDGE_ALIASES, a # new alias is needed for the latest edgeport f/w revision. To # ensure that upgrades work we use update_drv(1M) to add this # new alias if the driver has already been installed # Note that postinstall gets executed on both initial install # and upgrade NEW_ALIAS=usbif1608,1.100.config1.0 new_alias_not_added() { grep ${NEW_ALIAS} $BASEDIR/etc/driver_aliases > /dev/null 2>&1 return $? } installed() { driver=$1 grep "^${driver} " $BASEDIR/etc/name_to_major > /dev/null 2>&1 return $? } EXIT=0 USBSER_EDGE_ALIASES="\ \"usbif1608,1.config1.0\" \ \"usbif1608,3.config1.0\" \ \"usbif1608,4.config1.0\" \ \"usbif1608,5.config1.0\" \ \"usbif1608,6.config1.0\" \ \"usbif1608,7.config1.0\" \ \"usbif1608,c.config1.0\" \ \"usbif1608,d.config1.0\" \ \"usbif1608,e.config1.0\" \ \"usbif1608,f.config1.0\" \ \"usbif1608,10.config1.0\" \ \"usbif1608,11.config1.0\" \ \"usbif1608,12.config1.0\" \ \"usbif1608,13.config1.0\" \ \"usbif1608,14.config1.0\" \ \"usbif1608,201.config1.0\" \ \"usbif1608,205.config1.0\" \ \"usbif1608,206.config1.0\" \ \"usbif1608,207.config1.0\" \ \"usbif1608,20c.config1.0\" \ \"usbif1608,20d.config1.0\" \ \"usbif1608,215.config1.0\" \ \"usbif1608,217.config1.0\" \ \"usbif1608,21a.config1.0\" \ \"usbif1608,240.config1.0\" \ \"usbif1608,241.config1.0\" \ \"usbif1608,242.config1.0\" \ \"usbif1608,243.config1.0\" \ " if installed usbser_edge ; then new_alias_not_added || echo "${driver} \"${NEW_ALIAS}\"" >> \ ${BASEDIR}/etc/driver_aliases 2>/dev/null \ || EXIT 1 else add_drv ${BASEDIR_OPT} -m '* 0666 root sys' \ -i "${USBSER_EDGE_ALIASES} \"${NEW_ALIAS}\"" -n usbser_edge || \ EXIT=1 fi exit $EXIT