File: procps.init.linux

package info (click to toggle)
procps 2:3.3.12-3+deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,820 kB
  • sloc: ansic: 21,793; sh: 5,038; makefile: 444; exp: 367; sed: 16
file content (54 lines) | stat: -rw-r--r-- 1,191 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
49
50
51
52
53
54
#! /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 $local_fs
# Required-Stop:
# Should-Start:      udev module-init-tools
# X-Start-Before:    $network
# 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

PATH=/sbin:/bin

SYSCTL=/sbin/sysctl

test -x $SYSCTL || exit 0

. /lib/lsb/init-functions

# Comment this out for sysctl to print every item changed
QUIET_SYSCTL="-q"

# Check for existance of the default file and exit if not there,
# Closes #52839 for the boot-floppy people
if [ -f /etc/default/rcS ] ; then
  . /etc/default/rcS
fi

set -e

case "$1" in
	start|restart|force-reload|reload)
		log_action_begin_msg "Setting kernel variables"
		STATUS=0
		$SYSCTL $QUIET_SYSCTL --system || STATUS=$?
		log_action_end_msg $STATUS
		;;
	stop)
		;;
    status)
        ;;
	*)
		echo "Usage: /etc/init.d/procps {start|stop|restart|reload|force-reload|status}" >&2
		exit 3
		;;
esac

exit 0