#!/bin/sh #********************************************************************************** # Copyright (c) 1999-2004, Intel Corporation # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # 3. Neither the name of Intel Corporation nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # #*********************************************************************************** KERNVER=`cat /proc/version | awk "{print \\$3}"` echo running kernel $KERNVER if [ ${BUILD_ROOT} ] then KERNELVER=`cat ${KERNEL_SOURCE}/include/linux/version.h |grep UTS_RELEASE | awk ' { print $3 } ' | awk -F\" ' { print $2 } '` CharModDir=${BUILD_ROOT}/lib/modules/${KERNVER}/kernel/drivers/char echo Target kernel version is $KERNELVER else case $KERNVER in 2.4*) CharModDir=/lib/modules/${KERNVER}/kernel/drivers/char ;; 2.6*) CharModDir=/lib/modules/${KERNVER}/kernel/drivers/char ;; *) echo "unsupported kernel version. 2.4.x and 2.6.x are supported" exit 1 ;; esac fi if [ -a /etc/mandrake-release ]; then { if [ -a ./hamregistry.bin ]; then { mv -f /etc/hamregistry.bin /etc/hamregistry.bak cp ./hamregistry.bin /etc/hamregistry.bin } else { rm -f /etc/hamregistry.bin } fi echo installing hamregistry, used for persistant storage install -o root -g root -m 110 hamregistry /usr/sbin echo installing Intel 536 driver case $KERNVER in 2.4*) install -o root -g root -m 664 Intel536.o ${CharModDir}/Intel536.o || exit 1 ;; 2.6*) install -o root -g root -m 664 Intel536.ko ${CharModDir}/Intel536.ko || exit 1 ;; esac echo mandrake Intel536_boot script install -o root -g root -m 110 Intel536_boot /etc/rc.d/init.d ln -s -f /etc/rc.d/init.d/Intel536_boot /etc/rc.d/rc2.d/S99_Intel536 ln -s -f /etc/rc.d/init.d/Intel536_boot /etc/rc.d/rc3.d/S99_Intel536 ln -s -f /etc/rc.d/init.d/Intel536_boot /etc/rc.d/rc5.d/S99_Intel536 } elif [ -a /etc/SuSE-release ]; then { if [ -a ./hamregistry.bin ]; then { mv -f /etc/hamregistry.bin /etc/hamregistry.bak cp ./hamregistry.bin /etc/hamregistry.bin } else { rm -f /etc/hamregistry.bin } fi echo installing hamregistry, used for persistant storage install -o root -g root -m 110 hamregistry /usr/sbin echo installing Intel536 driver case $KERNVER in 2.4*) install -o root -g root -m 664 Intel536.o ${CharModDir}/Intel536.o || exit 1 ;; 2.6*) install -o root -g root -m 664 Intel536.ko ${CharModDir}/Intel536.ko || exit 1 ;; esac DISTVER=`grep VERSION /etc/SuSE-release | cut -f3 -d' '` echo SuSE version ${DISTVER} case $DISTVER in 6*| 7* ) echo "SuSE 6,7 boot scripts" INITDIR='/sbin/init.d' ;; 10*) echo "SuSE boot scripts" INITDIR='/etc/init.d' ;; esac install -o root -g root -m 110 Intel536_boot $INITDIR ln -s -f ${INITDIR}/Intel536_boot ${INITDIR}/boot.d/S99_Intel536 } elif [ -a /etc/redhat-release ]; then { if [ -a ./hamregistry.bin ]; then { mv -f /etc/hamregistry.bin /etc/hamregistry.bak cp ./hamregistry.bin /etc/hamregistry.bin } else { rm -f /etc/hamregistry.bin } fi echo installing hamregistry, used for persistant storage install -o root -g root -m 110 hamregistry /usr/sbin echo installing Intel536 driver case $KERNVER in 2.4*) install -o root -g root -m 664 Intel536.o ${CharModDir}/Intel536.o || exit 1 ;; 2.6*) install -o root -g root -m 664 Intel536.ko ${CharModDir}/Intel536.ko || exit 1 ;; esac echo redhat hamboot rc2.d and rc3.d scripts install -o root -g root -m 110 Intel536_boot /etc/rc.d/init.d ln -s -f /etc/rc.d/init.d/Intel536_boot /etc/rc.d/rc2.d/S99_Intel536 ln -s -f /etc/rc.d/init.d/Intel536_boot /etc/rc.d/rc3.d/S99_Intel536 ln -s -f /etc/rc.d/init.d/Intel536_boot /etc/rc.d/rc5.d/S99_Intel536 } elif [ -a /etc/redflag-release ]; then { if [ -a ./hamregistry.bin ]; then { mv -f /etc/hamregistry.bin /etc/hamregistry.bak cp ./hamregistry.bin /etc/hamregistry.bin } else { rm -f /etc/hamregistry.bin } fi echo installing hamregistry, used for persistant storage install -o root -g root -m 110 hamregistry /usr/sbin echo installing Intel536 driver case $KERNVER in 2.4*) install -o root -g root -m 664 Intel536.o ${CharModDir}/Intel536.o || exit 1 ;; 2.6*) install -o root -g root -m 664 Intel536.ko ${CharModDir}/Intel536.ko || exit 1 ;; esac echo redhat hamboot rc2.d and rc3.d scripts install -o root -g root -m 110 Intel536_boot /etc/rc.d/init.d ln -s -f /etc/rc.d/init.d/Intel536_boot /etc/rc.d/rc2.d/S99_Intel536 ln -s -f /etc/rc.d/init.d/Intel536_boot /etc/rc.d/rc3.d/S99_Intel536 ln -s -f /etc/rc.d/init.d/Intel536_boot /etc/rc.d/rc5.d/S99_Intel536 } elif [ -a /etc/conectiva-release ]; then { if [ -a ./hamregistry.bin ]; then { mv -f /etc/hamregistry.bin /etc/hamregistry.bak cp ./hamregistry.bin /etc/hamregistry.bin } else { rm -f /etc/hamregistry.bin } fi echo installing hamregistry, used for persistant storage install -o root -g root -m 110 hamregistry /usr/sbin echo installing Intel536 driver case $KERNVER in 2.4*) install -o root -g root -m 664 Intel536.o ${CharModDir}/Intel536.o || exit 1 ;; 2.6*) install -o root -g root -m 664 Intel536.ko ${CharModDir}/Intel536.ko || exit 1 ;; esac echo conectiva Intel536_boot rc3.d and rc5.d scripts install -o root -g root -m 755 Intel536_boot /etc/rc.d/init.d ln -s -f /etc/rc.d/init.d/Intel536_boot /etc/rc.d/rc3.d/S99_Intel536 ln -s -f /etc/rc.d/init.d/Intel536_boot /etc/rc.d/rc5.d/S99_Intel536 } else { if [ -a ./hamregistry.bin ]; then { mv -f /etc/hamregistry.bin /etc/hamregistry.bak cp ./hamregistry.bin /etc/hamregistry.bin } else { rm -f /etc/hamregistry.bin } fi echo installing hamregistry, used for persistant storage install -o root -g root -m 110 hamregistry /usr/sbin echo installing Intel536 driver case $KERNVER in 2.4*) install -o root -g root -m 664 Intel536.o ${CharModDir}/Intel536.o || exit 1 ;; 2.6*) install -o root -g root -m 664 Intel536.ko ${CharModDir}/Intel536.ko || exit 1 ;; esac echo unknown distribution. no boot scripts installed exit 1 } fi echo starting module and utilities depmod -a /bin/bash Intel536_boot restart echo done