Subversion Repositories f9daq

Rev

Rev 9 | Details | Compare with Previous | 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
11 f9daq 22
  # invoke insmod
23
 lsmod | grep $module
24
 /sbin/rmmod $module
9 f9daq 25
 # invoke insmod
26
 /sbin/insmod $module.ko || /sbin/insmod $module.o || exit 1
27
 
28
 # get major number from /proc/devices
29
 major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"`
30
 
31
 rm -f /dev/${device}$1
32
 mknod /dev/${device}$1 c $major $1
33
 
34
 chgrp $group /dev/${device}$1
35
 chmod $mode  /dev/${device}$1
11 f9daq 36
 ls -latr  /dev/${device}$1
9 f9daq 37
else
38
 echo "usage:  pcivme_load module_number"
39
fi
40