]> git.pld-linux.org Git - projects/rc-scripts.git/blob - init/modules.conf
fix tag pushing in make-tag.sh
[projects/rc-scripts.git] / init / modules.conf
1 # module-init-tools - load modules from /etc/modules
2 #
3 # This task loads the kernel modules specified in the /etc/modules file
4
5 description "load modules from /etc/modules"
6
7 start on (startup
8       and started udev)
9
10 task
11
12 script
13         {
14                 read _x _y v _z
15                 old_IFS=$IFS
16                 # strip _* or -* from versions like: "2.6.25_vanilla-1", "2.6.25-1"
17                 IFS='_-'
18                 set -- $v
19                 v1=${1}
20                 IFS='.'
21                 set -- $v1
22                 IFS=$old_IFS
23
24                 kernel="$1.$2"
25                 kerneleq="$1.$2.$3"
26         } < /proc/version
27
28         # Loop over every line in modules file
29         ( \
30                 grep -hvE '^(#|[[:blank:]]*$)' /etc/modules /etc/modules.$kernel /etc/modules.$kerneleq 2>/dev/null
31                 echo '' # make sure there is a LF at the end
32         ) | while read module args; do
33                 [ -z "$module" ] && continue
34                 # strip comments
35                 args=${args%%#*}
36                 modprobe -s $module -- $args
37         done
38 end script
This page took 0.037995 seconds and 3 git commands to generate.