2011-04-26 12:26:24 +02:00
|
|
|
#!/bin/sh
|
2013-03-22 17:53:08 +01:00
|
|
|
# Copyright (C) 2004-2013 Silvan Calarco <silvan.calarco@mambasoft.it>
|
2011-04-26 12:26:24 +02:00
|
|
|
|
|
|
|
. /etc/sysconfig/rc
|
|
|
|
. $rc_functions
|
|
|
|
|
|
|
|
KERNELREL=`uname -r`
|
|
|
|
|
|
|
|
# check for modules existence or exit
|
|
|
|
[ -e /lib/modules/$KERNELREL/modules.dep ] || exit 0
|
|
|
|
|
|
|
|
[ -r /etc/modprobe.conf ] && modulesfile="/etc/modprobe.conf"
|
|
|
|
[ -d /etc/modprobe.d ] && modulesfile="$modulesfile /etc/modprobe.d/*.conf"
|
|
|
|
|
|
|
|
module_alias=`egrep "^(probeall|alias)( |\t)*on-boot-*( |\t)*" $modulesfile 2>/dev/null | gawk '{ print $2 }'`
|
|
|
|
module_name=`egrep "^(probeall|alias)( |\t)*on-boot-*( |\t)*" $modulesfile 2>/dev/null | gawk '{ print $3 }'`
|
|
|
|
|
|
|
|
for module in $module_name \
|
|
|
|
`cat /etc/modules 2>/dev/null | grep -v ^#`\
|
2013-03-22 17:53:08 +01:00
|
|
|
`cat /etc/modules-load.d/*.conf 2>/dev/null | grep -v ^#`; do
|
2011-04-26 12:26:24 +02:00
|
|
|
echo -n "Loading $module module: "
|
|
|
|
modprobe $module 2>&1
|
|
|
|
evaluate_retval
|
|
|
|
echo
|
|
|
|
done
|
|
|
|
|
|
|
|
[ -e /proc/ide/hd[a-z] ] && \
|
|
|
|
cat /proc/ide/hd[a-z]/media | \
|
|
|
|
grep cdrom >/dev/null && modprobe ide-cd 2>/dev/null || :
|