#! /bin/sh #---------------------------------------------------------------------------- # /etc/rc.d/modules - load kernel modules # # Creation : 2003-09-05 fm # Last Update: $Id$ # # Copyright (c) 2001-2012 the eisfair team, team(at)eisfair(dot)org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- . /etc/config.d/base . /etc/init.d/functions # get kernel version case $(uname -r) in 2.6*) load='/sbin/modprobe' ;; *) load='/sbin/insmod' ;; esac case $1 in start) boot_mesg " * Loading kernel modules with $load ..." if [ "$POWEROFF" = "yes" ] then if ! lsmod | grep '^apm ' >/dev/null then case "$POWEROFF_SMP" in yes) smp=1 ;; *) smp=0 ;; esac case "$POWEROFF_REALMODE" in yes) realmode=1 ;; *) realmode=0 ;; esac ${load} apm power_off=1 smp=$smp realmode_power_off=$realmode 2>/dev/null fi fi idx=1 if [ "$MODULE_N" != "" ] then while [ $idx -le $MODULE_N ] do eval mod='$MODULE_'$idx eval opt='$MODULE_'$idx'_OPTION' $load $mod $opt idx=`/usr/bin/expr $idx + 1` done fi evaluate_retval ;; stop) ;; esac