home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / init.d / procps.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2007-03-07  |  1.2 KB  |  52 lines

  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. ### BEGIN INIT INFO
  7. # Provides:          procps
  8. # Required-Start:    mountkernfs
  9. # Required-Stop:
  10. # Default-Start:     S
  11. # Default-Stop:
  12. ### END INIT INFO
  13.  
  14.  
  15. # Check for existance of the default file and exit if not there,
  16. # Closes #52839 for the boot-floppy people
  17. [ -r /etc/default/rcS ] || exit 0
  18. . /etc/default/rcS
  19. . /lib/lsb/init-functions
  20.  
  21. PATH=/sbin:$PATH
  22. which sysctl > /dev/null || exit 0
  23.  
  24.  
  25. case "$1" in
  26.        start|restart|force-reload)
  27.                if [ ! -r /etc/sysctl.conf ]
  28.                then
  29.                        exit 0
  30.                fi
  31.                if [ "$VERBOSE" = "yes" ]
  32.                then
  33.                    quiet=""
  34.                log_begin_msg "Setting kernel variables..."
  35.                else
  36.                       quiet="-q"
  37.                fi
  38.                sysctl $quiet -p
  39.                if [ "$VERBOSE" = "yes" ]
  40.                then
  41.                log_end_msg $?
  42.            fi
  43.                ;;
  44.        stop)
  45.                ;;
  46.        *)
  47.            echo "Usage: /etc/init.d/procps.sh {start|stop|force-reload|restart}" >&2
  48.                exit 1
  49.                ;;
  50. esac
  51. exit 0
  52.