2 # /etc/init.d/procps: Set kernel variables from /etc/sysctl.conf
4 # written by Stephen Gran <sgran@debian.org> based on work by Elrond <Elrond@Wunder-Nett.org>
8 # Required-Start: mountkernfs $local_fs
10 # X-Start-Before: networking
13 # Short-Description: Configure kernel parameters at boottime
14 # Description: Loads kernel parameters that are specified in /etc/sysctl.conf
21 test -x $SYSCTL || exit 0
23 . /lib/lsb/init-functions
25 # Comment this out for sysctl to print every item changed
28 # Check for existance of the default file
29 if [ -f /etc/default/rcS ] ; then
37 start|restart|force-reload)
38 log_action_begin_msg "Setting kernel variables "
40 for file in /etc/sysctl.conf /etc/sysctl.d/*.conf ; do
41 if [ -r "$file" ] ; then
42 if [ "$VERBOSE" = "yes" ] ; then
43 log_action_cont_msg " $file"
45 egrep -v '^[[:space:]]*(#|$)' "$file" | while read line; do
46 $SYSCTL $QUIET_SYSCTL "$(echo $line | sed -e 's/ = /=/')"
50 log_action_end_msg $STATUS
55 echo "Usage: /etc/init.d/procps {start|stop|restart|force-reload}" >&2