blob: e719061a2978a212efcd298d553bc7302375476b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-sbin/files/sysctl.initd,v 1.3 2006/10/03 13:38:06 uberlord Exp $
depend() {
need checkroot
}
start() {
ebegin $"Configuring kernel parameters"
if [[ ! -f /etc/sysctl.conf ]]; then
eend 1 "/etc/sysctl.conf" $"not found"
return 1
fi
local retval=0 var= comments=
while read var comments ; do
[[ -z ${var} || ${var} == "#"* ]] && continue
sysctl "${var}" >/dev/null || retval=1
done < /etc/sysctl.conf
eend ${retval} $"Some errors were encountered"
}
# vim: set ts=4 :
|