Go to most recent revision | Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line | 
|---|---|---|---|
| 9 | f9daq | 1 | #!/bin/sh  | 
        
| 2 | #  | 
        ||
| 3 | # a simple shell script to load the pcivme driver module  | 
        ||
| 4 | # and to install the associated device files (Hi, 2004)  | 
        ||
| 5 | #  | 
        ||
| 6 | # $Log: pcivme_load,v $  | 
        ||
| 7 | # Revision 1.4 2004/08/13 19:34:45 klaus  | 
        ||
| 8 | # Changed to support kernels 2.6 and lesser  | 
        ||
| 9 | #  | 
        ||
| 10 | # Revision 1.3 2004/08/13 19:23:26 klaus  | 
        ||
| 11 | # conversion to kernel-version 2.6, released version 3.0  | 
        ||
| 12 | #  | 
        ||
| 13 | #  | 
        ||
| 14 | module="pcivme"  | 
        ||
| 15 | device="vmemm_"  | 
        ||
| 16 | group="root"  | 
        ||
| 17 | mode="666"  | 
        ||
| 18 | |||
| 19 | # the modulenumber must be given  | 
        ||
| 20 | if test $1  | 
        ||
| 21 | then  | 
        ||
| 22 | # invoke insmod  | 
        ||
| 23 | /sbin/insmod $module.ko || /sbin/insmod $module.o || exit 1  | 
        ||
| 24 | |||
| 25 | # get major number from /proc/devices  | 
        ||
| 26 |  major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"` | 
        ||
| 27 | |||
| 28 |  rm -f /dev/${device}$1 | 
        ||
| 29 |  mknod /dev/${device}$1 c $major $1 | 
        ||
| 30 | |||
| 31 |  chgrp $group /dev/${device}$1 | 
        ||
| 32 |  chmod $mode  /dev/${device}$1 | 
        ||
| 33 | else  | 
        ||
| 34 | echo "usage: pcivme_load module_number"  | 
        ||
| 35 | fi  | 
        ||
| 36 |