147 |
# calc module dependencies |
# calc module dependencies |
148 |
mecho "Calculating module dependencies ..." |
mecho "Calculating module dependencies ..." |
149 |
depmod -a ${KERNEL_VERSION} |
depmod -a ${KERNEL_VERSION} |
150 |
|
fi |
151 |
|
|
152 |
# re-read udev rules to grant the right permissions |
# re-read udev rules to grant the right permissions |
153 |
if [[ -x $(which udevadm) ]] |
if [[ -x $(which udevadm) ]] |
154 |
then |
then |
155 |
mecho "Reloading udev configuration ..." |
mecho "Reloading udev configuration ..." |
156 |
udevadm control --reload-rules |
udevadm control --reload-rules |
|
fi |
|
157 |
fi |
fi |
158 |
|
|
159 |
# load the module |
# load the module |
164 |
mecho "Loading kernel-module ${module} ..." |
mecho "Loading kernel-module ${module} ..." |
165 |
modprobe ${module} |
modprobe ${module} |
166 |
done |
done |
|
|
|
|
if [ $(echo ${KERNEL_VERSION%%-*} | sed 's:\.::g') -ge 2639 ] |
|
|
then |
|
|
# fixes NMI warnings with kernels >=2.6.31: |
|
|
# vboxdrv: Warning: 2.6.31+ kernel detected. Most likely the hardware performance |
|
|
# vboxdrv: counter framework which can generate NMIs is active. |
|
|
mecho "Disabled hardware performance counter NMIs ..." |
|
|
echo 2 > /proc/sys/kernel/perf_event_paranoid |
|
|
|
|
|
elif [ $(echo ${KERNEL_VERSION%%-*} | sed 's:\.::g') -ge 2631 ] |
|
|
then |
|
|
# fixes NMI warnings with kernels >=2.6.31: |
|
|
# vboxdrv: Warning: 2.6.31+ kernel detected. Most likely the hardware performance |
|
|
# vboxdrv: counter framework which can generate NMIs is active. |
|
|
mecho "Disabled hardware performance counter NMIs ..." |
|
|
echo 2 > /proc/sys/kernel/perf_counter_paranoid |
|
|
fi |
|
167 |
else |
else |
168 |
echo -e ${COLRED} |
echo -e ${COLRED} |
169 |
echo "Your current running kernel does not match the the module target." |
echo "Your current running kernel does not match the the module target." |