diff options
author | Bill Nottingham <notting@redhat.com> | 1999-12-28 06:11:06 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 1999-12-28 06:11:06 +0000 |
commit | 7d302ba296c897e3770de1ee968ab9eb4c963491 (patch) | |
tree | f23633a04f84a8876e7a1a4961d628a995c69be2 /rc.d/rc.sysinit | |
parent | d65f430d850549092ca90e784e753a3f76227c69 (diff) | |
download | initscripts-7d302ba296c897e3770de1ee968ab9eb4c963491.tar initscripts-7d302ba296c897e3770de1ee968ab9eb4c963491.tar.gz initscripts-7d302ba296c897e3770de1ee968ab9eb4c963491.tar.bz2 initscripts-7d302ba296c897e3770de1ee968ab9eb4c963491.tar.xz initscripts-7d302ba296c897e3770de1ee968ab9eb4c963491.zip |
switch from echoing values into /proc/sys to using sysctl
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-x | rc.d/rc.sysinit | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 1e2b3220..c4852c2d 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -44,23 +44,15 @@ fi action "Mounting proc filesystem" mount -n -t proc /proc /proc -# Turn off sysrq -if [ -f /proc/sys/kernel/sysrq -a "$MAGIC_SYSRQ" = "no" ]; then - echo "0" > /proc/sys/kernel/sysrq - action "Turning off Magic SysRq key" /bin/true -fi -# Turn off Stop-A -if [ -f /proc/sys/kernel/stop-a -a "$STOP_A" = "no" ]; then - echo "0" > /proc/sys/kernel/stop-a - action "Turning off Stop-A/Break-A" /bin/true -fi +# Configure kernel parameters + +action "Configuring kernel parameters" sysctl -p /etc/sysctl.conf # Set the system clock. ARC=0 SRM=0 UTC=0 - if [ -f /etc/sysconfig/clock ]; then . /etc/sysconfig/clock @@ -293,9 +285,10 @@ fi if [ -f /proc/sys/kernel/modprobe ]; then if [ -n "$USEMODULES" ]; then - echo "/sbin/modprobe" > /proc/sys/kernel/modprobe + sysctl -w kernel.modprobe="/sbin/modprobe" >/dev/null 2>&1 else - echo "" > /proc/sys/kernel/modprobe + # We used to set this to NULL, but that causes 'failed to exec' messages" + sysctl -w kernel.modprobe="/bin/true" >/dev/null 2>&1 fi fi |