#!/bin/sh # N.Kurz, EE, GSI, 4-Sep2-13: modified for diefferent kernel versions # JAM, EE, GSI, 29-Oct-2013: provided different devicenames for kinpex, pexaria # usage "load kinpex" # JAM EE, GSI, 6-Nov-2013: automatic check which device is present. always set /dev/pexor link KV=`uname -r` module="galapagos_$KV" class="galapagos" device="pexor0" if [ $# -gt 0 ];then device=$1 shift fi galname="galapagos" #kinpexname="kinpex" #pexarianame="pexaria" #mode="664" echo "Installing module: $module.ko" /sbin/insmod ./$module.ko echo "sleep before we check device nodes..." sleep 3 # now look what we got if [ -e "/dev/${device}" ] then echo "GALAPAGOS LOAD: use device name from command line /dev/${device}" elif [ -e "/dev/${galname}0" ] then device=${galname}0 #elif [ -e "/dev/${kinpexname}0" ] # then # device=${kinpexname}0 # ln -sf /dev/${device} /dev/pexor0 #elif [ -e "/dev/${pexarianame}0" ] # then # device=${pexarianame}0 else echo "PEXOR LOAD: could not find device of galapagos family at /dev Exiting!" exit fi echo "found device /dev/${device}" chmod a+rw /dev/${device} #ln -sf /dev/${device} /dev/${class} #ln -sf /dev/${device} /dev/pexor ls -l /dev/*gal*