Rev 9 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9 | Rev 11 | ||
---|---|---|---|
Line 17... | Line 17... | ||
17 | mode="666" |
17 | mode="666" |
18 | 18 | ||
19 | # the modulenumber must be given |
19 | # the modulenumber must be given |
20 | if test $1 |
20 | if test $1 |
21 | then |
21 | then |
- | 22 | # invoke insmod |
|
- | 23 | lsmod | grep $module |
|
- | 24 | /sbin/rmmod $module |
|
22 | # invoke insmod |
25 | # invoke insmod |
23 | /sbin/insmod $module.ko || /sbin/insmod $module.o || exit 1 |
26 | /sbin/insmod $module.ko || /sbin/insmod $module.o || exit 1 |
24 | 27 | ||
25 | # get major number from /proc/devices |
28 | # get major number from /proc/devices |
26 | major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"` |
29 | major=`cat /proc/devices | awk "\\$2==\"$module\" {print \\$1}"` |
Line 28... | Line 31... | ||
28 | rm -f /dev/${device}$1 |
31 | rm -f /dev/${device}$1 |
29 | mknod /dev/${device}$1 c $major $1 |
32 | mknod /dev/${device}$1 c $major $1 |
30 | 33 | ||
31 | chgrp $group /dev/${device}$1 |
34 | chgrp $group /dev/${device}$1 |
32 | chmod $mode /dev/${device}$1 |
35 | chmod $mode /dev/${device}$1 |
- | 36 | ls -latr /dev/${device}$1 |
|
33 | else |
37 | else |
34 | echo "usage: pcivme_load module_number" |
38 | echo "usage: pcivme_load module_number" |
35 | fi |
39 | fi |
36 | 40 |