~ubuntu-branches/ubuntu/raring/procps/raring-proposed

« back to all changes in this revision

Viewing changes to debian/procps.sh

  • Committer: Bazaar Package Importer
  • Author(s): Craig Small
  • Date: 2004-04-13 07:59:25 UTC
  • Revision ID: james.westby@ubuntu.com-20040413075925-p912qrtzn1b8cc3x
Tags: 1:3.2.1-2
* Fix Makefile patch so it works  with newer patch packages 
  Closes: #242574
* Changed the way SHARED is used in Makefiles
* init script looks nicer when setting multiple variables Closes: #241721

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# /etc/init.d/procps: Set kernel variables from /etc/sysctl.conf
 
3
#
 
4
# written by Elrond <Elrond@Wunder-Nett.org>
 
5
 
 
6
# Check for existance of the default file and exit if not there,
 
7
# Closes #52839 for the boot-floppy people
 
8
[ -r /etc/default/rcS ] || exit 0
 
9
. /etc/default/rcS
 
10
 
 
11
[ -x /sbin/sysctl ] || exit 0
 
12
 
 
13
 
 
14
case "$1" in
 
15
       start|reload|restart|force-reload)
 
16
               if [ ! -r /etc/sysctl.conf ]
 
17
               then
 
18
                       exit 0
 
19
               fi
 
20
               if [ "$VERBOSE" = "no" ]
 
21
               then
 
22
                       n="-n"
 
23
                       redir=">/dev/null"
 
24
               else
 
25
                       echo "Setting kernel variables ..."
 
26
                       n=""
 
27
                       redir=""
 
28
               fi
 
29
               eval "/sbin/sysctl $n -p $redir"
 
30
                           echo "... done."
 
31
               ;;
 
32
       stop|show)
 
33
               ;;
 
34
       *)
 
35
               echo "Usage: /etc/init.d/procps.sh {start|stop|reload|restart}" >&2
 
36
               exit 1
 
37
               ;;
 
38
esac
 
39
 
 
40