aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>1999-08-31 22:18:17 +0000
committerBill Nottingham <notting@redhat.com>1999-08-31 22:18:17 +0000
commit2dc7a9140cf2196852cd8769065cb86b4d803b73 (patch)
tree14581365d2bc8dcc89a06002de64ca9435350ae1
parentabb2109a73ad0d86ebb15265550eb037c5c4b889 (diff)
downloadinitscripts-2dc7a9140cf2196852cd8769065cb86b4d803b73.tar
initscripts-2dc7a9140cf2196852cd8769065cb86b4d803b73.tar.gz
initscripts-2dc7a9140cf2196852cd8769065cb86b4d803b73.tar.bz2
initscripts-2dc7a9140cf2196852cd8769065cb86b4d803b73.tar.xz
initscripts-2dc7a9140cf2196852cd8769065cb86b4d803b73.zip
disable magic sysrq by default
-rwxr-xr-xrc.d/rc.sysinit5
-rw-r--r--sysconfig.txt2
-rw-r--r--sysconfig/init2
3 files changed, 9 insertions, 0 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 0b7d2210..1b323314 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -121,6 +121,11 @@ fi
action "Mounting proc filesystem" mount -n -t proc /proc /proc
+# Turn off sysrq
+if [ "$MAGIC_SYSRQ" = "no" ]; then
+ echo "0" > /proc/sys/kernel/sysrq
+fi
+
if [ -f /fsckoptions ]; then
fsckoptions=`cat /fsckoptions`
else
diff --git a/sysconfig.txt b/sysconfig.txt
index 245d0ac4..b3a19b3f 100644
--- a/sysconfig.txt
+++ b/sysconfig.txt
@@ -51,6 +51,8 @@ Files in /etc/sysconfig
SETCOLOR_NORMAL=<a command>
A command to set the color to 'normal'. Defaults to nasty
ANSI sequences output by echo -e.
+ MAGIC_SYSRQ=yes|no
+ Set to 'no' to disable the magic sysrq key.
/etc/sysconfig/keyboard:
diff --git a/sysconfig/init b/sysconfig/init
index 7b4d8151..a06707d4 100644
--- a/sysconfig/init
+++ b/sysconfig/init
@@ -17,3 +17,5 @@ SETCOLOR_WARNING="echo -en \\033[1;33m"
SETCOLOR_NORMAL="echo -en \\033[0;39m"
# default kernel loglevel on boot (syslog will reset this)
LOGLEVEL=1
+# Set to something other than 'no' to turn on magic sysrq keys...
+MAGIC_SYSRQ=no