File: procps.sh

package info (click to toggle)
procps 1%3A3.2.1-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,264 kB
  • ctags: 1,685
  • sloc: ansic: 13,913; sh: 1,054; makefile: 164
file content (40 lines) | stat: -rw-r--r-- 1,039 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
#! /bin/sh
# /etc/init.d/procps: Set kernel variables from /etc/sysctl.conf
#
# written by Elrond <Elrond@Wunder-Nett.org>

# 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

[ -x /sbin/sysctl ] || exit 0


case "$1" in
       start|reload|restart|force-reload)
               if [ ! -r /etc/sysctl.conf ]
               then
                       exit 0
               fi
               if [ "$VERBOSE" = "no" ]
               then
                       n="-n"
                       redir=">/dev/null"
               else
                       echo "Setting kernel variables ..."
                       n=""
                       redir=""
               fi
               eval "/sbin/sysctl $n -p $redir"
			   echo "... done."
               ;;
       stop|show)
               ;;
       *)
               echo "Usage: /etc/init.d/procps.sh {start|stop|reload|restart}" >&2
               exit 1
               ;;
esac