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
12 # Short-Description: Configure kernel parameters at boottime
13 # Description: Loads kernel parameters that are specified in /etc/sysctl.conf
20 test -x $SYSCTL || exit 0
22 . /lib/lsb/init-functions
24 # Comment this out for sysctl to print every item changed
27 # Check for existance of the default file
28 if [ -f /etc/default/rcS ] ; then
36 start|restart|force-reload)
37 log_action_begin_msg "Setting kernel variables "
39 for file in /etc/sysctl.conf /etc/sysctl.d/*.conf ; do
40 if [ -r "$file" ] ; then
41 if [ "$VERBOSE" = "yes" ] ; then
42 log_action_cont_msg " $file"
44 egrep -v '^[[:space:]]*(#|$)' "$file" | while read line; do
45 $SYSCTL $QUIET_SYSCTL "$(echo $line | sed -e 's/ = /=/')"
49 log_action_end_msg $STATUS
54 echo "Usage: /etc/init.d/procps {start|stop|restart|force-reload}" >&2