home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20120521.etc.tar.gz / bradford.20120521.etc.tar / etc / init.d / boot.sysctl < prev    next >
Text File  |  2006-04-22  |  1KB  |  55 lines

  1. #! /bin/sh
  2. #
  3. # Copyright (c) 2001 SuSE GmbH Nuernberg, Germany.  All rights reserved.
  4. #
  5. # /etc/init.d/boot.sysctl
  6. #
  7. ### BEGIN INIT INFO
  8. # Provides:          boot.sysctl
  9. # Required-Start:    boot.ldconfig
  10. # X-Should-Start:    setserial boot.isapnp
  11. # Required-Stop:
  12. # Default-Start:     B
  13. # Default-Stop:
  14. # Description:       run sysctl with a given config file or create it
  15. ### END INIT INFO
  16.  
  17. . /etc/rc.status
  18. . /etc/sysconfig/sysctl
  19.  
  20. rc_reset
  21.  
  22. case "$1" in
  23.   start)
  24.     #
  25.     # run sysctl if the config file exists
  26.     # otherwise generate it
  27.     # the values set here might be overridden by the settings
  28.     # in /etc/sysconfig/sysctl
  29.     #
  30.     if [ -x /sbin/sysctl ] ; then
  31.       if [ ! -e /etc/sysctl.conf ]; then
  32.         echo -n "Sysctl: no file /etc/sysctl.conf"
  33.         rc_failed 5
  34.       else
  35.         echo "Setting current sysctl status from /etc/sysctl.conf"
  36.         sysctl -e -p /etc/sysctl.conf
  37.       fi
  38.       rc_status -v -r
  39.     fi
  40.     ;;
  41.     stop)
  42.     # skip / do nothing
  43.     ;;
  44.     status)
  45.     rc_failed 4
  46.     rc_status -v
  47.     ;;
  48.     *)
  49.     echo "Usage: $0 {start|stop|status}"
  50.     exit 1
  51.     ;;
  52. esac
  53.  
  54. rc_exit
  55.