aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-rw-r--r--rc.d/init.d/functions9
-rwxr-xr-xrc.d/init.d/network4
-rwxr-xr-xrc.d/rc.sysinit6
3 files changed, 12 insertions, 7 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 858bb043..f3dfc516 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -647,6 +647,15 @@ is_false() {
return 1
}
+# Apply sysctl settings, including files in /etc/sysctl.d
+apply_sysctl() {
+ sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
+ for file in /etc/sysctl.d/* ; do
+ is_ignored_file "$file" && continue
+ test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
+ done
+}
+
key_is_random() {
[ "$1" = "/dev/urandom" -o "$1" = "/dev/hw_random" \
-o "$1" = "/dev/random" ]
diff --git a/rc.d/init.d/network b/rc.d/init.d/network
index b31060b0..738a3440 100755
--- a/rc.d/init.d/network
+++ b/rc.d/init.d/network
@@ -61,7 +61,7 @@ case "$1" in
/etc/sysconfig/network-scripts/init.ipv6-global start pre
fi
- sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
+ apply_sysctl
# bring up loopback interface
action $"Bringing up loopback interface: " ./ifup ifcfg-lo
@@ -164,7 +164,7 @@ case "$1" in
/etc/sysconfig/network-scripts/init.ipv6-global start post
fi
# Run this again to catch any interface-specific actions
- sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
+ apply_sysctl
touch /var/lock/subsys/network
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index b9f8b7df..47c210f9 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -151,11 +151,7 @@ mount -n /dev/pts >/dev/null 2>&1
# Configure kernel parameters
update_boot_stage RCkernelparam
-sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
-for file in /etc/sysctl.d/* ; do
- is_ignored_file "$file" && continue
- test -f "$file" && sysctl -e -p "$file" >/dev/null 2>&1
-done
+apply_sysctl
# Set the hostname.
update_boot_stage RChostname