author | Florian Pose <fp@igh-essen.com> |
Fri, 21 Apr 2006 13:05:01 +0000 | |
changeset 198 | f7dff1ed01ba |
parent 181 | 3e9155836bc7 |
permissions | -rwxr-xr-x |
0 | 1 |
#!/bin/sh |
181
3e9155836bc7
Install script for realtime software
Florian Pose <fp@igh-essen.com>
parents:
28
diff
changeset
|
2 |
module="msr_rt" |
0 | 3 |
device="msr" |
4 |
mode="664" |
|
5 |
||
6 |
# Group: since distributions do it differently, look for wheel or use staff |
|
7 |
if grep '^staff:' /etc/group > /dev/null; then |
|
8 |
group="staff" |
|
9 |
else |
|
10 |
group="wheel" |
|
11 |
fi |
|
12 |
||
13 |
# invoke insmod with all arguments we got |
|
14 |
# and use a pathname, as newer modutils don't look in . by default |
|
28
801dc7eabf51
IPIPE,floatpoint,rtlib
Wilhelm Hagemeister <hm@igh-essen.com>
parents:
0
diff
changeset
|
15 |
/sbin/insmod -f ./$module.ko $* || exit 1 |
0 | 16 |
|
17 |
major=`cat /proc/devices | awk "\\$2==\"$device\" {print \\$1}"` |
|
18 |
||
19 |
echo $major |
|
20 |
# Remove stale nodes and replace them, then give gid and perms |
|
21 |
# Usually the script is shorter, it's scull that has several devices in it. |
|
22 |
||
23 |
rm -f /dev/${device} |
|
24 |
mknod /dev/${device} c $major 0 |
|
25 |
# ln -sf ${device}0 /dev/${device} |
|
26 |
chgrp users /dev/${device} |
|
27 |
chmod $mode /dev/${device} |
|
28 |
||
29 |
||
30 |
||
31 |
||
32 |
||
33 |
||
34 |
||
35 |
||
36 |