Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1247 - (hide annotations) (download)
Fri Mar 11 17:17:53 2011 UTC (13 years, 2 months ago) by niro
File size: 1126 byte(s)
-respect start|stop pragma
-use rc_print

1 niro 2 #!/bin/bash
2 niro 931 # $Id$
3 niro 2
4     #%rlevels: 7:s
5     #%start: 55
6     #%stop:
7    
8     #deps
9     #%needs:
10     #%before:
11     #%after:
12    
13 niro 781 source /etc/conf.d/rc
14     source ${rc_functions}
15 niro 2
16 niro 1247 case "$1" in
17     start)
18     # stops annoying kernel messages
19     echo "0" > /proc/sys/kernel/printk
20 niro 2
21 niro 1247 # renew deps only if not booted from livecd
22     # a livecd has always the file .bootdev at root
23     if [ ! -e /.bootdev ]
24     then
25     rc_print "Calculating modules dependencies ..."
26     modules-update
27     evaluate_retval
28     fi
29 niro 2
30 niro 1247 # get modules.autoload file matching to kernel
31     MODULESFILE=/etc/modules.autoload.d/kernel-$(kernel_major_version)
32     [[ ! -f ${MODULESFILE} ]] && MODULESFILE=/etc/modules.autoload
33 niro 2
34 niro 1247 (cat ${MODULESFILE}; echo) | # make sure there is a LF at the end
35     while read module args
36     do
37     case "${module}" in
38     \#*|"") continue ;;
39     esac
40     rc_print "Loading module ${COLBLUE}${module}${COLDEFAULT} ..."
41     modprobe ${module} ${args} &>/dev/null
42     evaluate_retval
43     done
44 niro 2
45 niro 1247 # sets default level for kernel messages
46     echo "3" > /proc/sys/kernel/printk
47 niro 2
48 niro 1247 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

Properties

Name Value
svn:executable *