Magellan Linux

Diff of /trunk/busybox-initscripts/rc/modules

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

revision 1234 by niro, Wed Dec 15 17:44:36 2010 UTC revision 1235 by niro, Thu Mar 10 20:22:25 2011 UTC
# Line 13  Line 13 
13  source /etc/conf.d/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 booted 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   rc_print "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  [[ ! -f ${MODULESFILE} ]] && MODULESFILE=/etc/modules.autoload   # get modules.autoload file matching to kernel
31     MODULESFILE=/etc/modules.autoload.d/kernel-$(kernel_major_version)
32  (cat ${MODULESFILE}; echo) | # make sure there is a LF at the end   [[ ! -f ${MODULESFILE} ]] && MODULESFILE=/etc/modules.autoload
33  while read module args  
34  do   (cat ${MODULESFILE}; echo) | # make sure there is a LF at the end
35   case "${module}" in   while read module args
36   \#*|"") continue ;;   do
37   esac   case "${module}" in
38   rc_print "Loading module ${COLBLUE}${module}${COLDEFAULT} ..."   \#*|"") continue ;;
39   modprobe ${module} ${args} &>/dev/null   esac
40   evaluate_retval   rc_print "Loading module ${COLBLUE}${module}${COLDEFAULT} ..."
41  done   modprobe ${module} ${args} &>/dev/null
42     evaluate_retval
43  # sets default level for kernel messages   done
44  echo "3" > /proc/sys/kernel/printk  
45     # sets default level for kernel messages
46  update_svcstatus $1   echo "3" > /proc/sys/kernel/printk
47  splash svc_started "$(basename $0)" 0  
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.1234  
changed lines
  Added in v.1235