1 #! /bin/sh 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License (the "License"). 7 # You may not use this file except in compliance with the License. 8 # 9 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 # or http://www.opensolaris.org/os/licensing. 11 # See the License for the specific language governing permissions 12 # and limitations under the License. 13 # 14 # When distributing Covered Code, include this CDDL HEADER in each 15 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 # If applicable, add the following below this CDDL HEADER, with the 17 # fields enclosed by brackets "[]" replaced with your own identifying 18 # information: Portions Copyright [yyyy] [name of copyright owner] 19 # 20 # CDDL HEADER END 21 # 22 23 # 24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. 25 # Use is subject to license terms. 26 # 27 28 # 29 # install the Sun Crypto Accelerator 1000 device drivers. 30 # 31 32 PATH="/usr/bin:/usr/sbin:${PATH}" 33 export PATH 34 NAMEMAJOR="${BASEDIR}/etc/name_to_major" 35 36 # 37 # Is the hardware there? 38 # 39 check_hardware() 40 { 41 for i in "pci14e4,5820" "pci14e4,5821" "pci14e4,5822" "pci14e4,5825" \ 42 "pci108e,5454" "pci108e,5455" "pci108e,5456" "pci108e,5457" 43 do 44 prtconf -pv | egrep -s "$i" 45 if [ $? -eq 0 ] 46 then 47 return 1 48 fi 49 done 50 return 0 51 } 52 53 hw_opt= 54 check_hardware 55 if [ $? -eq 0 ] 56 then 57 hw_opt="-n" 58 fi 59 60 if [ "${BASEDIR:=/}" = "/" ] 61 then 62 ADD_DRV="/usr/sbin/add_drv $hw_opt" 63 else 64 ADD_DRV="/usr/sbin/add_drv $hw_opt -b ${BASEDIR}" 65 fi 66 67 grep -w dca ${NAMEMAJOR} > /dev/null 2>&1 68 if [ $? -ne 0 ] 69 then 70 $ADD_DRV -i '"pci14e4,5820" "pci14e4,5821" "pci14e4,5822" "pci14e4,5825" "pci108e,5454" "pci108e,5455" "pci108e,5456" "pci108e,5457"' \ 71 dca || exit 1 72 fi 73 74 exit 0