aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/functions
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2011-02-28 16:56:40 -0500
committerBill Nottingham <notting@redhat.com>2011-02-28 16:56:40 -0500
commit3f296db591da779000a301b2b29560ee6df413f3 (patch)
treebd05f5215506843145e7e8ad28e1c5ca14b5c450 /rc.d/init.d/functions
parent13f2ec05b5af5f57b6847b04185c6e710dc769b2 (diff)
downloadinitscripts-3f296db591da779000a301b2b29560ee6df413f3.tar
initscripts-3f296db591da779000a301b2b29560ee6df413f3.tar.gz
initscripts-3f296db591da779000a301b2b29560ee6df413f3.tar.bz2
initscripts-3f296db591da779000a301b2b29560ee6df413f3.tar.xz
initscripts-3f296db591da779000a301b2b29560ee6df413f3.zip
Move sysctl.conf/sysctl.d handling to a function, call it where appropriate. (#593211, continued)
Diffstat (limited to 'rc.d/init.d/functions')
-rw-r--r--rc.d/init.d/functions9
1 files changed, 9 insertions, 0 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index da8d9794..7377f999 100644
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -658,6 +658,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" ]