#!/bin/ksh # This class action script copies the files being replaced # into a package being constructed in $BUILD_DIR. This class # action script is only appropriate for regular files that # are installed by simply copying them into place. # # For special package objects such as edittable files, the patch # producer must supply appropriate class action scripts. # # directory format options. # # @(#)i.script 1.15 04/04/08 SMI # # Copyright (c) 2004 by Sun Microsystems, Inc. # All rights reserved # ECHO="/usr/bin/echo" SED="/usr/bin/sed" PKGPROTO="/usr/bin/pkgproto" EXPR="/usr/bin/expr" # used by dirname MKDIR="/usr/bin/mkdir" CP="/usr/bin/cp" RM="/usr/bin/rm" MV="/usr/bin/mv" KSH="/usr/bin/ksh" DIFF="/usr/bin/diff" OLD_PATCH_SEPARATOR="___Old_File_Diff_Separator_aBcDeFgHiJkLmN___OjK___5924894_6548915___" recovery="no" Pn=$$ procIdCtr=0 CMDS_USED="$KSH $ECHO $SED $PKGPROTO $EXPR $MKDIR $CP $RM $MV" LIBS_USED="" if [ "$PKG_INSTALL_ROOT" = "/" ]; then PKG_INSTALL_ROOT="" fi # Check to see if this is a patch installation retry. if [ "$INTERRUPTION" = "yes" ]; then if [ -d "$PKG_INSTALL_ROOT/var/tmp/$SUNW_PATCHID.$PKGINST" ] || [ -d "$PATCH_BUILD_DIR/$SUNW_PATCHID.$PKGINST" ]; then recovery="yes" fi fi if [ -n "$PATCH_BUILD_DIR" -a -d "$PATCH_BUILD_DIR" ]; then BUILD_DIR="$PATCH_BUILD_DIR/$SUNW_PATCHID.$PKGINST" else BUILD_DIR="$PKG_INSTALL_ROOT/var/tmp/$SUNW_PATCHID.$PKGINST" fi FILE_DIR=$BUILD_DIR/files RELOC_DIR=$FILE_DIR/reloc ROOT_DIR=$FILE_DIR/root BO_Deletes=$FILE_DIR/deletes PROGNAME=`basename $0` if [ "$PATCH_PROGRESSIVE" = "true" ]; then PATCH_NO_UNDO="true" fi # Since this is generic, figure out the class. Class=`echo $PROGNAME | nawk ' { print substr($0, 3) }'` # Since this is an update, $BASEDIR is guaranteed to be correct BD=${BASEDIR:-/} cd $BD # # First, figure out the dynamic libraries that can trip us up. # if [ -z "$PKG_INSTALL_ROOT" ]; then if [ -x /usr/bin/ldd ]; then LIB_LIST=`/usr/bin/ldd $CMDS_USED | sort -u | nawk ' $1 ~ /\// { continue; } { printf "%s ", $3 } '` else LIB_LIST="/usr/lib/libc.so.1 /usr/lib/libdl.so.1 /usr/lib/libw.so.1 /usr/lib/libintl.so.1 /usr/lib/libgen.so.1 /usr/lib/libadm.so.1 /usr/lib/libelf.so.1" fi fi # # Now read the list of files in this class to be replaced. If the file # is already in place, then this is a change and we need to copy it # over to the build directory if undo is allowed. If it's a new entry # (No $dst), then it goes in the deletes file for the backout package. # LD_LIB_DIR=$PKG_INSTALL_ROOT/var/tmp/LDLIB.$$ procIdCtr=0 while read src dst; do if [ -z "$PKG_INSTALL_ROOT" ]; then Chk_Path=$dst for library in $LIB_LIST; do if [ "$Chk_Path" = "$library" ]; then if [ ! -d "$LD_LIB_DIR" ]; then $MKDIR $LD_LIB_DIR fi $CP $dst $LD_LIB_DIR LD_LIBRARY_PATH=$LD_LIB_DIR export LD_LIBRARY_PATH fi done fi if [ "$PATCH_PROGRESSIVE" = "true" ]; then # If this is being used in an old-style patch, insert # the old-style script commands here. #XXXOld_CommandsXXX# echo >/dev/null # dummy fi if [ "${PATCH_NO_UNDO}" != "true" ]; then # # Here we construct the path to the appropriate source # tree for the build. First we try to strip BASEDIR. If # there's no BASEDIR in the path, we presume that it is # absolute and construct the target as an absolute path # by stripping PKG_INSTALL_ROOT. FS_Path is the path to # the file on the file system (for deletion purposes). # Build_Path is the path to the object in the build # environment. # # The following rootPath variable accounts for a BASEDIR # that is used as a regular variable within the path and # not as a variable that a path needs to be relocated to. rootPath=`$ECHO $src | $SED s@"$INST_DATADIR/$PKGINST"@@ | \ nawk -F/ '{print $2}'` if [ "$rootPath" = "root" ]; then FS_Path=$dst elif [ "$BD" = "/" ]; then FS_Path=`$ECHO $dst | $SED s@"$BD"@@` else FS_Path=`$ECHO $dst | $SED "s|^$BD/||"` fi # If it's an absolute path the attempt to strip the # BASEDIR will have failed. if [ "$dst" = "$FS_Path" ]; then if [ -z "$PKG_INSTALL_ROOT" ]; then FS_Path=$dst Build_Path="$ROOT_DIR$dst" else Build_Path="$ROOT_DIR"`echo $dst | \ $SED "s|$PKG_INSTALL_ROOT||"` FS_Path=`echo $dst | \ $SED "s|$PKG_INSTALL_ROOT||"` fi else Build_Path="$RELOC_DIR/$FS_Path" fi if [ -f "$dst" ]; then # If this is replacing something cd $FILE_DIR # # Construct the prototype file entry. We replace # the pointer to the filesystem object with the # build directory object. # $PKGPROTO -c $Class $dst=$FS_Path | \ $SED -e "s|^f |e |" \ -e "s|=$dst|=$Build_Path|" >> \ $BUILD_DIR/prototype # Now copy over the file if [ "$recovery" = "no" ]; then DirName=`dirname $Build_Path` $MKDIR -p $DirName $CP -p $dst $Build_Path else # If this file is already in the build area skip it if [ -f "$Build_Path" ]; then cd $BD continue else DirName=`dirname $Build_Path` if [ ! -d "$DirName" ]; then $MKDIR -p $DirName fi $CP -p $dst $Build_Path fi fi cd $BD else # It's brand new $ECHO $FS_Path >> $BO_Deletes fi fi # If special processing is required for each src/dst pair, # add that here. # #XXXSpecial_CommandsXXX# # #Save original file $MKDIR -p "`dirname $Build_Path`" $CP "${dst}" "$Build_Path.orig" $CP "${dst}" "$Build_Path.old_and_patch" # # t is a temp file we can use to make copies of the dst # file in. Sometimes we cant just do simple appends of new # entries. # t=/tmp/mstr$$ cannot_merge() { echo "EXISTING_FILE_RENAMED: $dst $dst.$SUNW_PATCHID.$$" >> /tmp/CLEANUP echo "EXISTING_FILE_RENAMED: $dst $dst.$SUNW_PATCHID.$$" mv $dst $dst.$SUNW_PATCHID.$$ $CP -p $src $dst.$$$procIdCtr if [ $? -ne 0 ]; then $RM $dst.$$$procIdCtr 1>/dev/null 2>&1 else $MV -f $dst.$$$procIdCtr $dst for library in $LIB_LIST; do if [ "$library" = "$dst" ]; then unset $LD_LIBRARY_PATH fi done fi procIdCtr=`expr $procIdCtr + 1` } if [ ! -f $dst ] ; then # Initial installation $CP -p $src $dst.$$$procIdCtr if [ $? -ne 0 ]; then $RM $dst.$$$procIdCtr 1>/dev/null 2>&1 else $MV -f $dst.$$$procIdCtr $dst for library in $LIB_LIST; do if [ "$library" = "$dst" ]; then unset $LD_LIBRARY_PATH fi done fi procIdCtr=`expr $procIdCtr + 1` else # Preserve a copy jic manual restoration is needed. efile_name=`basename $dst` $CP $dst $PKGSAV/$efile_name.old.$SUNW_PATCHID # # If the installed version of the master file is too old # we're going to just have to punt on merging, and use the # install version. # existvers=`grep \#ident $dst | awk '{ print $3 }'` exmaj=`echo $existvers | awk 'BEGIN {FS="."} {print $1}'` exmin=`echo $existvers | awk 'BEGIN {FS="."} {print $2}'` majormatch=`expr $exmaj = "1"` tooold=`expr $exmin \< "156"` if [ "$majormatch" != "1" ] then cannot_merge continue elif [ "$tooold" = "1" ] then cannot_merge continue fi # # Preserve the installed version of # /boot/solaris/devicedb/master during upgrade # # Master file entries added after the release of # Solaris 2.6 need to be duplicated here so that upgrade # of an installed version of the master file include any # changes while preserving any user applied changes. # (Which would most likely come from third-party driver # additions.) # # # Additional sbpro/joyst entries # while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF ADS7180 sbpro oth all sbpro.bef "ADS Sound Blaster" AZT1008 sbpro oth all sbpro.bef "Aztech AZT1008 Sound Device" CTL0041 sbpro oth all sbpro.bef "Sound Blaster" CTL0043 sbpro oth all sbpro.bef "Creative Labs Sound Blaster 16 Vibra" CTL0044 sbpro oth all sbpro.bef "Creative Labs Sound Blaster AWE64 Gold" ESS1868 sbpro oth all sbpro.bef "ESS ES1868 AudioDrive" ESS6881 sbpro oth all sbpro.bef "Sound Blaster" EOF grep CTL7002 $dst > /dev/null 2>&1 if [ $? = 1 ] then cat >> $dst << EOF CTL7002 joyst oth all joyst.bef "Game port (Joy stick)" EOF fi # New Entry for dnet: grep pci1011,19 $dst > /dev/null 2>&1 if [ $? = 1 ] then cat >> $dst << EOF pci1011,19 pci1011,19 net pci dnet.bef "DEC 21142/21143 Fast Ethernet" EOF fi # Recognizing new SMC EtherPower II 10/100 (9432) cards # using their device id (included old supported # cards having SubSysID a011 and a015) # Entry for spwr: while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF pci10b8,5 pci10b8,5 net pci spwr.bef "SMC EtherPower II 10/100 (9432)" EOF # New iprb server entry while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF pci8086,1029 pci8086,1029 net pci iprb.bef "Intel Pro/100 Network Adapter" pci8086,1030 pci8086,1030 net pci iprb.bef "Intel InBusiness 10/100 Network Adapter" pci8086,1031 pci8086,1031 net pci iprb.bef "Intel Pro/100 VE Ethernet" pci8086,1032 pci8086,1032 net pci iprb.bef "Intel Pro/100 VE Ethernet" pci8086,1038 pci8086,1038 net pci iprb.bef "Intel 82559 PRO/100 VM Ethernet" pci8086,1039 pci8086,1039 net pci iprb.bef "Intel 82801DB Ethernet 82562ET/EZ PHY" pci8086,103d pci8086,103d net pci iprb.bef "Intel 82801DB PRO/100 VE Ethernet" pci8086,1229 pci8086,1229 net pci iprb.bef "Intel Pro100/B Fast Ethernet" pci8086,1229.8086.1009 pci8086,1229 net pci iprb.bef "Intel Pro100/B Fast Ethernet" pci8086,1229.8086.100c pci8086,1229 net pci iprb.bef "Intel Pro100/B Fast Ethernet" pci8086,1229.8086.1012 pci8086,1229 net pci iprb.bef "Intel Pro100/B Fast Ethernet" pci8086,1229.8086.1013 pci8086,1229 net pci iprb.bef "Intel Pro100/B Fast Ethernet" pci8086,1229.8086.1015 pci8086,1229 net pci iprb.bef "Intel Pro100/B Fast Ethernet" pci8086,1229.8086.1016 pci8086,1229 net pci iprb.bef "Intel Pro100/B Fast Ethernet" pci8086,1229.8086.1017 pci8086,1229 net pci iprb.bef "Intel Pro100/B Fast Ethernet" pci8086,2449 pci8086,2449 net pci iprb.bef "Intel i815/82559 Ethernet" EOF # New igige server entry while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF pci8086,1000 pci8086,1000 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1001 pci8086,1001 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1004 pci8086,1004 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1008 pci8086,1008 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1009 pci8086,1009 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,100d pci8086,100d net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,100e pci8086,100e net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,100f pci8086,100f net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1010 pci8086,1010 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1011 pci8086,1011 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1012 pci8086,1012 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1013 pci8086,1013 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1014 pci8086,1014 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1015 pci8086,1015 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1016 pci8086,1016 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1017 pci8086,1017 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1018 pci8086,1018 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1019 pci8086,1019 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,101a pci8086,101a net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,101d pci8086,101d net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,101e pci8086,101e net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1026 pci8086,1026 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1027 pci8086,1027 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1028 pci8086,1028 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,105a pci8086,105a net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,105b pci8086,105b net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,105c pci8086,105c net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,105e pci8086,105e net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,105f pci8086,105f net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1060 pci8086,1060 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1061 pci8086,1061 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1062 pci8086,1062 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1063 pci8086,1063 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1075 pci8086,1075 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1076 pci8086,1076 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1077 pci8086,1077 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,1079 pci8086,1079 net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,107a pci8086,107a net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,107b pci8086,107b net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,107c pci8086,107c net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,107d pci8086,107d net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,107e pci8086,107e net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,107f pci8086,107f net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,108a pci8086,108a net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,108b pci8086,108b net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,108c pci8086,108c net pci none "Intel(R) PRO/1000 Server Adapter Driver" pci8086,109a pci8086,109a net pci none "Intel(R) PRO/1000 Server Adapter Driver" EOF # New adpu320 server entry while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF pci9005,8000 pci9005,8000 msd pci adpu320.bef "Adaptec SCSI Card 29320A(H1B) - Ultra320 SCSI" pci9005,8010 pci9005,8010 msd pci adpu320.bef "Adaptec SCSI Card 39320 - Ultra320 SCSI" pci9005,8011 pci9005,8011 msd pci adpu320.bef "Adaptec SCSI Card 39320D - Ultra320 SCSI" pci9005,8012 pci9005,8012 msd pci adpu320.bef "Adaptec SCSI Card 29320 - Ultra320 SCSI" pci9005,8014 pci9005,8014 msd pci adpu320.bef "Adaptec SCSI Card 29320LP - Ultra320 SCSI" pci9005,8015 pci9005,8015 msd pci adpu320.bef "Adaptec SCSI Card 39320(H2B) - Ultra320 SCSI" pci9005,8016 pci9005,8016 msd pci adpu320.bef "Adaptec SCSI Card 39320A - Ultra320 SCSI" pci9005,8017 pci9005,8017 msd pci adpu320.bef "Adaptec SCSI Card 29320ALP(H1B) - Ultra320 SCSI" pci9005,801d pci9005,801d msd pci adpu320.bef "Adaptec SCSI Card AIC-7902B - Ultra320 SCSI" pci9005,801e pci9005,801e msd pci adpu320.bef "Adaptec SCSI Card AIC-7901A - Ultra320 SCSI" pci9005,801f pci9005,801f msd pci adpu320.bef "Adaptec AIC-7902 - Ultra320 SCSI" EOF # New bge server entry while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF pci14e4,1644 pci14e4,1644 net pci none "Broadcom 5700 Gigabit Ethernet" pci14e4,1645 pci14e4,1645 net pci none "Broadcom 5701 Gigabit Ethernet" pci14e4,1647 pci14e4,1647 net pci none "Broadcom 5703C Gigabit Ethernet" pci14e4,1648 pci14e4,1648 net pci none "Broadcom 5704C Gigabit Ethernet" pci14e4,16a7 pci14e4,16a7 net pci none "Broadcom 5703S Gigabit Ethernet" pci14e4,16c7 pci14e4,16c7 net pci none "Broadcom 5703 Gigabit Ethernet" pci14e4,16a8 pci14e4,16a8 net pci none "Broadcom 5704S Gigabit Ethernet" pci14e4,165d pci14e4,165d net pci none "Broadcom 5705M Gigabit Ethernet" pci14e4,165e pci14e4,165e net pci none "Broadcom 5705MA3 Gigabit Ethernet" pci14e4,1677 pci14e4,1677 net pci none "Broadcom 5751 Gigabit Ethernet" pci14e4,167d pci14e4,167d net pci none "Broadcom 5751M Gigabit Ethernet" pci14e4,1659 pci14e4,1659 net pci none "Broadcom 5721 Gigabit Ethernet" pci14e4,1696 pci14e4,1696 net pci none "Broadcom 5782 Gigabit Ethernet" pci14e4,169c pci14e4,169c net pci none "Broadcom 5788 Gigabit Ethernet" EOF # New rtls server entry while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF pci10ec,8139 pci10ec,8139 net pci none "Realtek 8139 Fast Ethernet" EOF # New AAC entries while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF pci1028,a pci1028,a msd pci none "PERC 3/DI RAID Controller" pci9005,285 pci9005,285 msd pci none "Adaptec AdvancedRAID Controller" EOF # New AMR entries while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF pci1028,e pci1028,e msd pci none "PERC 4/DI RAID Controller" pci1028,f pci1028,f msd pci none "PERC 4/DI RAID Controller" pci1028,493 pci1028,493 msd pci none "PERC 3/DC RAID Controller" pci1028,518 pci1028,518 msd pci none "PERC 4/DC RAID Controller" pci1028,520 pci1028,520 msd pci none "PERC 4/SC RAID Controller" pci1000,532 pci1000,532 msd pci none "MegaRAID SCSI 320-2x" EOF # New ncrs entries grep pci1000,6 $dst > /dev/null 2>&1 if [ $? = 1 ] then cat >> $dst << EOF pci1000,6 pci1000,6 msd pci ncrs.bef "Symbios Logic 53c865 SCSI" pci1000,c pci1000,c msd pci ncrs.bef "Symbios Logic 53c895 SCSI" pci1000,f pci1000,f msd pci ncrs.bef "Symbios Logic 53c875 SCSI" EOF fi # New ncrpqs entries grep "pci101a,f2[def]" $dst > /dev/null 2>&1 if [ $? = 1 ] then cat >> $dst << EOF pci101a,f2d scsi msd pci none "NCR PDS/PQS 53C896-based PCI SCSI Adapter" compatible="pci101a,f2d" pci101a,f2e scsi msd pci none "NCR PDS/PQS 53C896-based PCI SCSI Adapter" compatible="pci101a,f2e" pci101a,f2f scsi msd pci none "NCR PDS/PQS 53C896-based PCI SCSI Adapter" compatible="pci101a,f2f" EOF fi # New Diamond Fireport 40 ncrs entry grep pci1000,8f $dst > /dev/null 2>&1 if [ $? = 1 ] then cat >> $dst << EOF pci1000,8f pci1000,8f msd pci ncrs.bef "Diamond Fireport 40 (SYM53C876)" EOF fi # Now make sure all the elxl entries are present for devid in 9000 9001 9004 9005 9006 9050 9051 9055 9056 9200 9800 9805 ; do grep pci10b7,$devid $dst > /dev/null 2>&1 if [ $? = 1 ] then grep pci10b7,$devid >> $dst << EOF pci10b7,9000 pci10b7,9000 net pci elxl.bef "3Com 3C900-TPO Etherlink XL" pci10b7,9001 pci10b7,9001 net pci elxl.bef "3Com 3C900-COMBO Etherlink XL" pci10b7,9004 pci10b7,9004 net pci elxl.bef "3Com 3C900B-TPO Etherlink XL" pci10b7,9005 pci10b7,9005 net pci elxl.bef "3Com 3C900B-COMBO Etherlink XL" pci10b7,9006 pci10b7,9006 net pci elxl.bef "3Com 3C900B-TPC Etherlink XL" pci10b7,9050 pci10b7,9050 net pci elxl.bef "3Com 3C905-TX Fast Etherlink XL 10/100" pci10b7,9051 pci10b7,9051 net pci elxl.bef "3Com 3C905-T4 Fast Etherlink XL 10/100" pci10b7,9055 pci10b7,9055 net pci elxl.bef "3Com 3C905B-TX Fast Etherlink XL 10/100" pci10b7,9056 pci10b7,9056 net pci elxl.bef "3Com 3C905B-T4 Fast Etherlink XL 10/100" pci10b7,9200 pci10b7,9200 net pci elxl.bef "3Com 3C905C-TX-M Fast Etherlink XL 10/100" pci10b7,9800 pci10b7,9800 net pci elxl.bef "3Com 3C980-TX Fast Etherlink Server 10/100" pci10b7,9805 pci10b7,9805 net pci elxl.bef "3Com 3C980C-TXM Fast Etherlink Server 10/100" EOF fi done grep 'pci class entries:' $dst > /dev/null 2>&1 if [ $? = 1 ] then cat >> $dst << EOF # # pci class entries: # EOF fi grep '^pciclass,0101[0-9A-Fa-f][0-9A-Fa-f]' $dst > /dev/null 2>&1 if [ $? = 0 ] then # # Remove old pciclass entries for pci-ide # sed -e \ '/^pciclass,0101[0-9A-Fa-f][0-9A-Fa-f].*$/ d /^# Note that there are some entries which may require driver changes to.*$/ d /^# work properly (pciclass,0101\[4-6,c-e\]\[0-f\]). These say that.*$/ d /^# separately-disableable IDE channels are supported, but the primary.*$/ d /^# and\/or secondary channel is disabled\..*$/ d ' $dst > $t cp $t $dst fi # # Add the new wildcard pciclass entry for pci-ide if it does not exist already # grep '^pciclass,0101 pci-ide msd pciclass ata.bef "IDE controller"' $dst > /dev/null 2>&1 if [ $? = 1 ] then cat >> $dst << EOF # # PCI Class entries with 2 byte class codes are treated as wildcard class # specifiers (with the 3rd byte (programming interface) as the wildcard). Hence, # the following entry will match ALL devices whose pci classes begin with "0101" # (any programming interface version) # pciclass,0101 pci-ide msd pciclass ata.bef "PCI IDE controller" EOF fi # Add Silicon Image SATA controller-specific entries while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF pci1095,3112 pci-ide msd pci ata.bef "Silicon Image 3112 SATA Controller" pci1095,3114 pci-ide msd pci ata.bef "Silicon Image 3114 SATA Controller" pci1095,3512 pci-ide msd pci ata.bef "Silicon Image 3512 SATA Controller" EOF # Add "nvidia ck8-04 Gigabit Ethernet" entries while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF pci10de,57 pci10de,cb84 net pci none "nvidia ck8-04 Gigabit Ethernet" pci10de,56 pci10de,cb84 net pci none "nvidia ck8-04 Gigabit Ethernet" pci10de,57 pci10f1,2865 net pci none "nvidia ck8-04 Gigabit Ethernet" pci10de,56 pci10f1,2865 net pci none "nvidia ck8-04 Gigabit Ethernet" pci10de,57 pci10f1,2895 net pci none "nvidia ck8-04 Gigabit Ethernet" pci10de,56 pci10f1,2895 net pci none "nvidia ck8-04 Gigabit Ethernet" EOF # # Remove erroneous entry for Symbios Logic 53c875/95 (ncrs) # sed -e '/^pci1000,1000/d' $dst >$t cp $t $dst # # Check for new pcn support # grep CSI2203 $dst > /dev/null 2>&1 if [ $? = 1 ] then sed -e '/^PNP8231/s/PNP8231|ATK1500|ADV55AA|PNP828C/PNP8231|ATK1500|ADV55AA|PNP828C|CSI2203/' $dst > $t cp $t $dst fi # # Remove obsolete driver entries # sed -e '/el\.bef/d' \ -e '/elx\.bef/d' \ -e '/elink\.bef/d' \ -e '/riles\.bef/d' \ -e '/aha1540\.bef/d' \ -e '/aha1740\.bef/d' \ -e '/aic\.bef/d' \ -e '/blogic\.bef/d' \ -e '/eepro\.bef/d' \ -e '/pe3\.bef/d' \ -e '/smc\.bef/d' \ -e '/trantor\.bef/d' \ -e '/esa\.bef/d' \ -e '/iee\.bef/d' \ -e '/ieef\.bef/d' \ -e '/nei\.bef/d' \ -e '/tr\.bef/d' \ -e '/nee\.bef/d' \ -e '/smce\.bef/d' \ -e '/smcf\.bef/d' \ -e '/smceu\.bef/d' \ -e '/nfe\.bef/d' \ -e '/^pci10b8,0005/d' \ $dst > $t cp $t $dst # # Remove all MCA device database entries # sed -e '/ mca /d' \ -e '/^# Micro-channel/,/^#$/d' \ $dst > $t cp $t $dst # # Console redesign changes # grep "pnpPNP,900" $dst > /dev/null 2>&1 if [ $? = 1 ] then sed \ -e 's/chanmux/display/g' \ -e 's/kdmouse/mouse/g' \ -e '/^SUN0006/s/$/ compatible="pnpPNP,900"/' \ -e '/^PNP0900/s/$/ compatible="pnpPNP,900"/' \ -e '/^PNP0902/s/$/ compatible="pnpPNP,900"/' \ -e '/^PNP0302/s/kd/keyboard/' \ -e '/^PNP0302/s/PNP0302/PNP0301|PNP0303/' \ $dst > $t cat >> $t << EOF pciclass,030000|pciclass,000100 display vid pciclass none "VGA compatible display adapter" pciclass,030001 display vid pciclass none "VGA+8514 compatible display adapter" EOF cp $t $dst fi # # Add an entry for C&T VGAs - some BIOSes don't mark them # as compatible with generic VGAs. # grep "PNP0931" $dst > /dev/null 2>&1 if [ $? = 1 ] then cat >> $dst << EOF PNP0931 display vid all none "Chips & Tech VGA Display Adapter" compatible="pnpPNP,900" EOF fi # # Add pnpisa modems # grep "HSM0240" $dst > /dev/null 2>&1 if [ $? = 1 ] then sed \ -e 's/SUP1381/SUP1381|HSM0240/' \ $dst > $t cp $t $dst fi # # Replace the entire keyboard line # keyboard_ids="PNP0300|PNP0301|PNP0302|PNP0303|PNP0304|PNP0305|PNP0306|PNP0307|PNP0308|PNP0309|PNP030A|PNP030B|PNP0320|PNP0321|PNP0322|PNP0323|PNP0324|PNP0325|PNP0326|PNP0327|PNP0340|PNP0341|PNP0342|PNP0343|PNP0344" grep "key.bef" $dst > /dev/null 2>&1 if [ $? = 0 ] then sed \ -e '/key.bef/s/.*\(keyboard.*key.*all.*key\.bef.*\)/'$keyboard_ids' \1/' \ $dst > $t cp $t $dst fi # # Remove all original keyboard entries (but not # customer additions) # grep "^PNP0301|PNP0303[^|]" $dst > /dev/null 2>&1 if [ $? = 1 ] then sed -e '/^PNP0301|PNP0303[^|]/d' \ $dst > $t cp $t $dst fi # # Create new mouse and keyboard entries. # while read i j do grep "$i" $dst > /dev/null 2>&1 if [ $? = 1 ]; then echo $i $j >> $dst fi done << EOF SVI0101 SVI0101 oth all none "Sun Fire B100x BSC" ACPI0001 acpi oth all none "ACPI SMBus 1.0 Host Controller" ACPI0002 acpi oth all none "ACPI Smart Battery Subsystem" ACPI0003 acpi oth all none "ACPI AC Device" ACPI0004 acpi oth all none "ACPI Module Device" ACPI0005 acpi oth all none "ACPI SMBus 2.0 Host Controller" ACPI0006 acpi oth all none "ACPI GPE Block Device" ACPI0007 acpi oth all none "ACPI Processor Device" ACPI0008 acpi oth all none "ACPI Ambient Light Sensor Device" ACPI0009 acpi oth all none "I/OxAPIC Device" ACPI000A acpi oth all none "I/O APIC Device" ACPI000B acpi oth all none "I/O SAPIC Device" PNP0300 keyboard key all none "IBM PC/XT keyboard controller (83-key)" PNP0302 keyboard key all none "IBM PC/XT keyboard controller (84-key)" PNP0301 keyboard key all none "IBM PC/AT keyboard controller (86-key)" PNP0303 keyboard key all none "IBM Enhanced (101/102-key, PS/2 mouse support)" PNP0304 keyboard key all none "Olivetti Keyboard (83-key)" PNP0305 keyboard key all none "Olivetti Keyboard (102-key)" PNP0306 keyboard key all none "Olivetti Keyboard (86-key)" PNP0307 keyboard key all none "Microsoft Windows(R) Keyboard" PNP0308 keyboard key all none "General Input Device Emulation Interface (GIDEI) legacy" PNP0309 keyboard key all none "Olivetti Keyboard (A101/102 key)" PNP030A keyboard key all none "AT&T 302 keyboard" PNP030B keyboard key all none "Reserved by Microsoft" PNP0320 keyboard key all none "Japanese 101-key keyboard" PNP0321 keyboard key all none "Japanese AX keyboard" PNP0322 keyboard key all none "Japanese 106-key keyboard A01" PNP0323 keyboard key all none "Japanese 106-key keyboard 002/003" PNP0324 keyboard key all none "Japanese 106-key keyboard 001" PNP0325 keyboard key all none "Japanese Toshiba Desktop keyboard" PNP0326 keyboard key all none "Japanese Toshiba Laptop keyboard" PNP0327 keyboard key all none "Japanese Toshiba Notebook keyboard" PNP0340 keyboard key all none "Korean 84-key keyboard" PNP0341 keyboard key all none "Korean 86-key keyboard" PNP0342 keyboard key all none "Korean Enhanced keyboard" PNP0343 keyboard key all none "Korean Enhanced keyboard 101b" PNP0343 keyboard key all none "Korean Enhanced keyboard 101c" PNP0344 keyboard key all none "Korean Enhanced keyboard 103" PNP0F01 mouse ptr all none "Microsoft Serial Mouse" PNP0F02 mouse ptr all none "Microsoft InPort Mouse" PNP0F04 mouse ptr all none "Mouse Systems Mouse" PNP0F05 mouse ptr all none "Mouse Systems 3-Button Mouse (COM2)" PNP0F06 mouse ptr all none "Genius Mouse (COM1)" PNP0F07 mouse ptr all none "Genius Mouse (COM2)" PNP0F08 mouse ptr all none "Logitech Serial Mouse" PNP0F09 mouse ptr all none "Microsoft BallPoint Serial Mouse" PNP0F0A mouse ptr all none "Microsoft Plug and Play Mouse" PNP0F0B mouse ptr all none "Microsoft Plug and Play BallPoint Mouse" PNP0F0C mouse ptr all none "Microsoft-compatible Serial Mouse" PNP0F0D mouse ptr all none "Microsoft-compatible InPort-compatible Mouse" PNP0F0E mouse ptr all none "Microsoft-compatible PS/2-style Mouse" PNP0F0F mouse ptr all none "Microsoft-compatible Serial BallPoint-compatible Mouse" PNP0F10 mouse ptr all none "Texas Instruments QuickPort Mouse" PNP0F11 mouse ptr all none "Microsoft-compatible Bus Mouse" PNP0F14 mouse ptr all none "Microsoft Kids Mouse" PNP0F16 mouse ptr all none "Logitech SWIFT device" PNP0F17 mouse ptr all none "Logitech-compatible serial mouse" PNP0F18 mouse ptr all none "Logitech-compatible bus mouse" PNP0F1A mouse ptr all none "Logitech-compatible SWIFT Device" PNP0F1B mouse ptr all none "HP Omnibook Mouse" PNP0F1D mouse ptr all none "Compaq LTE Trackball Serial Mouse" PNP0F1E mouse ptr all none "Microsoft Kids Trackball Mouse" PNP0F1F mouse ptr all none "Reserved by Microsoft Input Device Group" PNP0F20 mouse ptr all none "Reserved by Microsoft Input Device Group" PNP0F21 mouse ptr all none "Reserved by Microsoft Input Device Group" PNP0F22 mouse ptr all none "Reserved by Microsoft Input Device Group" PNP0F23 mouse ptr all none "Reserved by Microsoft Input Device Group" PNP0FFF mouse ptr all none "Reserved by Microsoft Systems" SYN010B mouse ptr all none "Synaptics mouse pad" EOF # # Replace Copyright year and SCCS id if it seems appropriate # if grep '^#ident' $dst > /dev/null 2>&1 then sed -n -e '1,/^#ident/p' $src > $t sed -e '1,/^#ident/d' $dst >> $t cp $t $dst fi rm -f $t fi echo "${OLD_PATCH_SEPARATOR}" >> "$Build_Path.old_and_patch" $DIFF -C 3 "$Build_Path.orig" "$dst" >> "$Build_Path.old_and_patch" if [ "$?" -ne 0 ] ; then #Create a repository for original file and diff in the undo package $ECHO "e $Class $FS_Path.old_and_patch=$Build_Path.old_and_patch" >>$BUILD_DIR/prototype #Make sure this file does not remain on the system after the backout $ECHO "$FS_Path.old_and_patch" >>"$BO_Deletes" fi done # If additional operations are required for this package, place # those package-specific commands here. #XXXSpecial_CommandsXXX# # # Release the dynamic libraries # if [ -d "$LD_LIB_DIR" ]; then $RM -fr $LD_LIB_DIR fi exit 0