File: init

package info (click to toggle)
procps 1%3A3.2.7-11
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,620 kB
  • ctags: 1,764
  • sloc: ansic: 14,645; sh: 5,299; makefile: 216
file content (48 lines) | stat: -rw-r--r-- 1,247 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#! /bin/sh
# /etc/init.d/procps: Set kernel variables from /etc/sysctl.conf
#
# written by Elrond <Elrond@Wunder-Nett.org>

### BEGIN INIT INFO
# Provides:          procps
# Required-Start:    mountkernfs
# Required-Stop:
# Default-Start:     S
# Default-Stop:
# Short-Description: Configure kernel parameters at boottime
# Description:  Loads kernel parameters that are specified in /etc/sysctl.conf
### END INIT INFO


# Check for existance of the default file and exit if not there,
# Closes #52839 for the boot-floppy people
[ -r /etc/default/rcS ] || exit 0
. /etc/default/rcS
. /lib/lsb/init-functions

PATH=/sbin:$PATH
which sysctl > /dev/null || exit 0


case "$1" in
       start|restart|force-reload)
	           quiet="-q"
			   if [ "$VERBOSE" = "yes" ]; then
				       quiet=""
               fi
	           for file in /etc/sysctl.conf /etc/sysctl.d/*.conf ; do
				 if [ -r "$file" ] ; then
				   log_action_begin_msg "Setting kernel variables ($file)"
				   sysctl $quiet -p "$file"
				   log_action_end_msg $?
				 fi
			   done
               ;;
       stop)
               ;;
       *)
               echo "Usage: /etc/init.d/procps {start|stop|restart|force-reload}" >&2
               exit 3
               ;;
esac
exit 0