diff options
Diffstat (limited to '')
-rwxr-xr-x | urunlevel/my_linux/Trinux/loadmodules | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/urunlevel/my_linux/Trinux/loadmodules b/urunlevel/my_linux/Trinux/loadmodules new file mode 100755 index 0000000..69c28ad --- /dev/null +++ b/urunlevel/my_linux/Trinux/loadmodules | |||
@@ -0,0 +1,30 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | ls /lib/modules/*.o > /tmp/modules.in 2> /dev/null | ||
4 | ls /usr/local/lib/modules/*.o >> /tmp/modules.in 2> /dev/null | ||
5 | |||
6 | sort /tmp/modules.in | uniq > /tmp/modules | ||
7 | |||
8 | for module in `cat /tmp/modules` | ||
9 | do | ||
10 | base=`basename $module` | ||
11 | naked=`basename $base .o` | ||
12 | |||
13 | |||
14 | #echo "base: $base" | ||
15 | #echo "naked: $naked" | ||
16 | |||
17 | |||
18 | if grep $naked /etc/tux/config/modules 2> /dev/null | ||
19 | then | ||
20 | param=`grep $naked /etc/tux/config/modules | cut -d' ' -f2- 2> /dev/null` | ||
21 | echo "Loading $module $param" | ||
22 | if insmod $module $param 2> /dev/null | ||
23 | then | ||
24 | echo $module >> /etc/proc/modules.in | ||
25 | else | ||
26 | echo $module >> /etc/proc/modules.out | ||
27 | fi | ||
28 | fi | ||
29 | done | ||
30 | |||