#!/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 # JAM 13-Oct-2016: adjust for usage with dabc pexor driver #KV=`uname -r`i module="pexor" class="pexor" device="pexor-0" if [ $# -gt 0 ];then device=$1 shift fi pexorname="pexor" 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 "PEXOR LOAD: use device name from command line /dev/${device}" elif [ -e "/dev/${pexorname}-0" ] then device=${pexorname}-0 elif [ -e "/dev/${kinpexname}-0" ] then device=${kinpexname}-0 ln -sf /dev/${device} /dev/pexor-0 elif [ -e "/dev/${pexarianame}-0" ] then device=${pexarianame}-0 else echo "PEXOR LOAD: could not find device of pexor 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/*pex*