Lines 69-74
Link Here
|
69 |
} |
69 |
} |
70 |
|
70 |
|
71 |
start() { |
71 |
start() { |
|
|
72 |
local KV=$(uname -r) |
73 |
local KV_MAJOR=$(KV_major "${KV}") |
74 |
local KV_MINOR=$(KV_minor "${KV}") |
75 |
local KV_MICRO=$(KV_micro "${KV}") |
76 |
|
72 |
# Should not fail if kernel do not have module |
77 |
# Should not fail if kernel do not have module |
73 |
# support compiled in ... |
78 |
# support compiled in ... |
74 |
[ -f /proc/modules ] || return 0 |
79 |
[ -f /proc/modules ] || return 0 |
Lines 88-116
Link Here
|
88 |
eend $? "Failed to calculate module dependencies" |
93 |
eend $? "Failed to calculate module dependencies" |
89 |
fi |
94 |
fi |
90 |
|
95 |
|
91 |
if [ -f /etc/modules.autoload -a ! -L /etc/modules.autoload ] |
96 |
local autoload="" |
92 |
then |
97 |
if [[ -f /etc/modules.autoload && ! -L /etc/modules.autoload ]]; then |
93 |
# Loop over every line in /etc/modules.autoload. |
98 |
autoload=/etc/modules.autoload |
94 |
load_modules /etc/modules.autoload |
99 |
else |
95 |
else |
100 |
local x |
96 |
local KV="$(uname -r)" |
101 |
for x in "${KV}" ${KV_MAJOR}.${KV_MINOR}.${KV_MICRO} ${KV_MAJOR}.${KV_MINOR} ; do |
97 |
local KV_MAJOR="`KV_major "${KV}"`" |
102 |
if [[ -f /etc/modules.autoload.d/kernel-"${x}" ]] ; then |
98 |
local KV_MINOR="`KV_minor "${KV}"`" |
103 |
autoload="/etc/modules.autoload.d/kernel-${x}" |
99 |
|
104 |
break |
100 |
# New support for /etc/modules.autoload/kernel-$KV |
105 |
fi |
101 |
if [ "$(get_KV)" -ge "$(KV_to_int '2.5.48')" ] && \ |
106 |
done |
102 |
[ -f /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}" ] |
107 |
fi |
103 |
then |
108 |
[[ -n ${autoload} ]] && load_modules "${autoload}" |
104 |
load_modules /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}" |
|
|
105 |
|
106 |
elif [ ! -f /etc/modules.autoload.d/kernel-"${KV_MAJOR}.${KV_MINOR}" ] |
107 |
then |
108 |
ewarn "Missing /etc/modules.autoload.d/kernel-${KV_MAJOR}.${KV_MINOR}" |
109 |
load_modules /etc/modules.autoload.d/kernel-2.4 |
110 |
else |
111 |
load_modules /etc/modules.autoload.d/kernel-2.4 |
112 |
fi |
113 |
fi |
114 |
|
109 |
|
115 |
# |
110 |
# |
116 |
# Just in case a sysadmin prefers generic symbolic links in |
111 |
# Just in case a sysadmin prefers generic symbolic links in |