home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
rescue
/
etc
/
init.d
/
boot.proc
< prev
next >
Wrap
Text File
|
2006-11-29
|
2KB
|
80 lines
#! /bin/sh
#
# Copyright (c) 2001-2002 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
#
# /etc/init.d/boot.proc
#
### BEGIN INIT INFO
# Provides: boot.proc
# Required-Start:
# Should-Start: boot.rootfsck boot.localfs
# Required-Stop:
# Default-Start: B
# Default-Stop:
# Description: sets some procfs values
### END INIT INFO
. /etc/rc.status
. /etc/sysconfig/sysctl
rc_reset
case "$1" in
start)
#
# check if sysrq should be enabled
#
if test -e /proc/sys/kernel/sysrq ; then
read a < /proc/cmdline
case "$a" in
*sysrq=yes*|*sysrq=1*) ENABLE_SYSRQ="yes" ;;
esac
if test "$ENABLE_SYSRQ" = yes ; then
echo "1" > /proc/sys/kernel/sysrq
else
echo "0" > /proc/sys/kernel/sysrq
fi
fi
#
# check if STOP-A should be enabled
#
if test -e /proc/sys/kernel/stop-a ; then
if test "$ENABLE_STOP_A" = yes ; then
echo "1" > /proc/sys/kernel/stop-a
else
echo "0" > /proc/sys/kernel/stop-a
fi
fi
#
# check if bootsplash graphics should be disabled
#
if test -e /proc/splash ; then
test "$SPLASH" = "no" && echo "0" > /proc/splash
fi
# Disable ECN if required.
if test -e /proc/sys/net/ipv4/tcp_ecn; then
test "$DISABLE_ECN" = "yes" && echo "0" > /proc/sys/net/ipv4/tcp_ecn
test "$DISABLE_ECN" = "no" && echo "1" > /proc/sys/net/ipv4/tcp_ecn
fi
;;
stop|restart)
# skip / nothing to do
;;
status)
rc_failed 4
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|status|restart}"
exit 1
;;
esac
rc_exit