-
Notifications
You must be signed in to change notification settings - Fork 47
/
S03modules
executable file
·39 lines (27 loc) · 896 Bytes
/
S03modules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
SYS_MODULES_FILE="/etc/modules"
BOOT_MODULES_FILE="/boot/modules"
MODULES_FILE="/data/etc/modules"
test -n "${OS_VERSION}" || source /etc/init.d/base
case "$1" in
start)
msg_begin "Loading kernel modules"
if [[ -r ${SYS_MODULES_FILE} ]]; then
cat ${SYS_MODULES_FILE} | while read line; do test -n "${line}" && /sbin/modprobe ${line} &>/dev/null; done
fi
if [[ -r ${BOOT_MODULES_FILE} ]]; then
cat ${BOOT_MODULES_FILE} | while read line; do test -n "${line}" && /sbin/modprobe ${line} &>/dev/null; done
fi
if [[ -r ${MODULES_FILE} ]]; then
cat ${MODULES_FILE} | while read line; do test -n "${line}" && /sbin/modprobe ${line} &>/dev/null; done
fi
msg_done
;;
stop)
true
;;
*)
echo "Usage: $0 {start}"
exit 1
esac
exit $?