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.20101108.etc.tar.gz / bradford.20101108.etc.tar / etc / init.d / boot.proc < prev    next >
Text File  |  2005-08-18  |  1KB  |  79 lines

  1. #! /bin/sh
  2. #
  3. # Copyright (c) 2001-2002 SuSE Linux AG, Nuernberg, Germany.
  4. # All rights reserved.
  5. #
  6. # /etc/init.d/boot.proc
  7. #
  8. ### BEGIN INIT INFO
  9. # Provides:          boot.proc
  10. # Required-Start:
  11. # Required-Stop:
  12. # Default-Start:     B
  13. # Default-Stop:
  14. # Description:       sets some procfs values
  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.     # check if sysrq should be enabled
  26.     #
  27.     if test -e /proc/sys/kernel/sysrq ; then
  28.         read a < /proc/cmdline
  29.         case "$a" in
  30.         *sysrq=yes*|*sysrq=1*) ENABLE_SYSRQ="yes" ;;
  31.         esac
  32.         if test "$ENABLE_SYSRQ" = yes ; then
  33.         echo "1" > /proc/sys/kernel/sysrq 
  34.         else
  35.         echo "0" > /proc/sys/kernel/sysrq 
  36.         fi
  37.     fi
  38.     
  39.     #
  40.     # check if STOP-A should be enabled
  41.     #
  42.     if test -e /proc/sys/kernel/stop-a ; then
  43.         if test "$ENABLE_STOP_A" = yes ; then
  44.         echo "1" > /proc/sys/kernel/stop-a
  45.         else
  46.         echo "0" > /proc/sys/kernel/stop-a
  47.         fi
  48.     fi
  49.     
  50.     #
  51.     # check if bootsplash graphics should be disabled
  52.     #
  53.     if test -e /proc/splash ; then
  54.         test "$SPLASH" = "no" && echo "0" > /proc/splash
  55.     fi
  56.     
  57.     # Disable ECN if required.
  58.     if test -e /proc/sys/net/ipv4/tcp_ecn; then
  59.         test "$DISABLE_ECN" = "yes" && echo "0" > /proc/sys/net/ipv4/tcp_ecn
  60.         test "$DISABLE_ECN" = "no"  && echo "1" > /proc/sys/net/ipv4/tcp_ecn
  61.     fi
  62.  
  63.     ;;
  64.     stop|restart)
  65.         # skip / nothing to do
  66.     ;;
  67.     status)
  68.     rc_failed 4
  69.     rc_status -v
  70.     ;;
  71.     *)
  72.     echo "Usage: $0 {start|stop|status|restart}"
  73.     exit 1
  74.     ;;
  75. esac
  76.  
  77. rc_exit
  78.  
  79.