]>
Commit | Line | Data |
---|---|---|
73d9a908 MT |
1 | #!/bin/sh |
2 | ######################################################################## | |
3 | # Begin $rc_base/init.d/sysctl | |
4 | # | |
5 | # Description : File uses /etc/sysctl.conf to set kernel runtime | |
6 | # parameters | |
7 | # | |
8 | # Authors : Nathan Coulson (nathan@linuxfromscratch.org) | |
9 | # Matthew Burgress (matthew@linuxfromscratch.org) | |
10 | # | |
11 | # Version : 00.00 | |
12 | # | |
13 | # Notes : | |
14 | # | |
15 | ######################################################################## | |
16 | ||
17 | . /etc/sysconfig/rc | |
18 | . ${rc_functions} | |
19 | ||
20 | case "${1}" in | |
21 | start) | |
22 | if [ -f "/etc/sysctl.conf" ]; then | |
23 | boot_mesg "Setting kernel runtime parameters..." | |
24 | sysctl -q -p | |
25 | evaluate_retval | |
26 | fi | |
10dd2afd AF |
27 | arch=`uname -m` |
28 | case "${arch}" in | |
6cf219c4 MT |
29 | armv*) |
30 | arch="armv6l": | |
10dd2afd AF |
31 | ;; |
32 | esac | |
33 | if [ -f "/etc/sysctl-${arch}.conf" ]; then | |
34 | boot_mesg "Setting ${arch}-kernel runtime parameters..." | |
35 | sysctl -q -p /etc/sysctl-${arch}.conf | |
36 | evaluate_retval | |
37 | fi | |
73d9a908 MT |
38 | ;; |
39 | ||
40 | status) | |
41 | sysctl -a | |
42 | ;; | |
43 | ||
44 | *) | |
45 | echo "Usage: ${0} {start|status}" | |
46 | exit 1 | |
47 | ;; | |
48 | esac | |
49 | ||
50 | # End $rc_base/init.d/sysctl |