summaryrefslogtreecommitdiffstats
path: root/source/a/sysvinit-scripts/scripts/rc.S
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/sysvinit-scripts/scripts/rc.S')
-rw-r--r--source/a/sysvinit-scripts/scripts/rc.S15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/a/sysvinit-scripts/scripts/rc.S b/source/a/sysvinit-scripts/scripts/rc.S
index 2466cd77a..608b4da69 100644
--- a/source/a/sysvinit-scripts/scripts/rc.S
+++ b/source/a/sysvinit-scripts/scripts/rc.S
@@ -301,14 +301,21 @@ if [ -x /etc/rc.d/rc.modules -a -z "$container" ]; then
fi
# Configure kernel parameters:
+if [ -r /etc/default/sysctl ]; then
+ # Source user defined options:
+ . /etc/default/sysctl
+else
+ SYSCTL_OPTIONS="-e --system"
+fi
if [ -x /sbin/sysctl -a -r /etc/sysctl.conf -a -z "$container" ]; then
- echo "Configuring kernel parameters: /sbin/sysctl -e --system"
- /sbin/sysctl -e --system
+ echo "Configuring kernel parameters: /sbin/sysctl $SYSCTL_OPTIONS"
+ /sbin/sysctl $SYSCTL_OPTIONS
elif [ -x /sbin/sysctl -a -z "$container" ]; then
- echo "Configuring kernel parameters: /sbin/sysctl -e --system"
+ echo "Configuring kernel parameters: /sbin/sysctl $SYSCTL_OPTIONS"
# Don't say "Applying /etc/sysctl.conf" or complain if the file doesn't exist
- /sbin/sysctl -e --system 2> /dev/null | grep -v "Applying /etc/sysctl.conf"
+ /sbin/sysctl $SYSCTL_OPTIONS 2> /dev/null | grep -v "Applying /etc/sysctl.conf"
fi
+unset SYSCTL_OPTIONS
# Check all the non-root filesystems:
if [ ! -r /etc/fastboot -a -z "$container" ]; then