2008-03-02 21:14:01 +00:00
|
|
|
#!@PREFIX@/sbin/runscript
|
2008-01-11 15:31:10 +00:00
|
|
|
# Copyright 2007-2008 Roy Marples <roy@marples.name>
|
|
|
|
# All rights reserved. Released under the 2-clause BSD license.
|
2007-11-20 12:10:32 +00:00
|
|
|
|
2008-01-11 12:13:46 +00:00
|
|
|
depend()
|
|
|
|
{
|
2007-11-20 12:10:32 +00:00
|
|
|
use hostname
|
|
|
|
before bootmisc logger
|
2008-03-02 21:13:21 +00:00
|
|
|
keyword noprefix
|
2007-11-20 12:10:32 +00:00
|
|
|
}
|
|
|
|
|
2008-01-11 12:13:46 +00:00
|
|
|
start()
|
|
|
|
{
|
2007-11-20 12:10:32 +00:00
|
|
|
[ -e /etc/sysctl.conf ] || return 0
|
|
|
|
|
|
|
|
ebegin "Configuring kernel parameters"
|
|
|
|
local retval=0 var= comments=
|
2007-11-28 15:45:03 +00:00
|
|
|
while read var comments; do
|
2007-11-20 12:10:32 +00:00
|
|
|
case "${var}" in
|
|
|
|
""|"#"*) continue;;
|
|
|
|
esac
|
2008-01-10 23:48:53 +00:00
|
|
|
sysctl -w "${var}" >/dev/null || retval=1
|
2007-11-20 12:10:32 +00:00
|
|
|
done < /etc/sysctl.conf
|
|
|
|
eend ${retval} "Some errors were encountered"
|
|
|
|
eend $?
|
|
|
|
}
|