Magellan Linux

Diff of /trunk/magellan-initscripts/etc/rc.d/init.d/modules

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3 by niro, Mon Dec 13 22:52:07 2004 UTC revision 1247 by niro, Fri Mar 11 17:17:53 2011 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    # $Id$
3    
4  #%rlevels: 7:s  #%rlevels: 7:s
5  #%start: 55  #%start: 55
# Line 9  Line 10 
10  #%before:  #%before:
11  #%after:  #%after:
12    
13  source /etc/sysconfig/rc  source /etc/conf.d/rc
14  source $rc_functions  source ${rc_functions}
15    
16  # stops annoying kernel messages  case "$1" in
17  echo "0" > /proc/sys/kernel/printk   start)
18     # stops annoying kernel messages
19  #renew deps only if not bootet from livecd   echo "0" > /proc/sys/kernel/printk
20  #a livecd has always the file .bootdev at root  
21  if [ ! -e /.bootdev ]   # renew deps only if not booted from livecd
22  then   # a livecd has always the file .bootdev at root
23   echo -e ${COLOREDSTAR}"Calculating Modules Dependencies ..."   if [ ! -e /.bootdev ]
24   modules-update   then
25   evaluate_retval   rc_print "Calculating modules dependencies ..."
26  fi   modules-update
27     evaluate_retval
28  #get modules.autoload file matching to kernel   fi
29  MODULESFILE=/etc/modules.autoload.d/kernel-$(kernel_major_version)  
30     # get modules.autoload file matching to kernel
31  (cat ${MODULESFILE}; echo) | # make sure there is a LF at the end   MODULESFILE=/etc/modules.autoload.d/kernel-$(kernel_major_version)
32  while read module args   [[ ! -f ${MODULESFILE} ]] && MODULESFILE=/etc/modules.autoload
33  do  
34   case "${module}" in   (cat ${MODULESFILE}; echo) | # make sure there is a LF at the end
35   \#*|"") continue ;;   while read module args
36   esac   do
37   echo -e ${COLOREDSTAR}"Loading module ${COLBLUE}${module}${COLDEFAULT} ..."   case "${module}" in
38   modprobe ${module} ${args} &>/dev/null   \#*|"") continue ;;
39   evaluate_retval   esac
40  done   rc_print "Loading module ${COLBLUE}${module}${COLDEFAULT} ..."
41     modprobe ${module} ${args} &>/dev/null
42  # sets default level for kernel messages   evaluate_retval
43  echo "3" > /proc/sys/kernel/printk   done
44    
45  update_svcstatus $1   # sets default level for kernel messages
46  splash svc_started "$(basename $0)" 0   echo "3" > /proc/sys/kernel/printk
47    
48     update_svcstatus $1
49     splash svc_started "$(basename $0)" 0
50     ;;
51    
52     *)
53     rc_echo "Usage: $0 {start}"
54     exit 1
55     ;;
56    esac

Legend:
Removed from v.3  
changed lines
  Added in v.1247