From 2dc7a9140cf2196852cd8769065cb86b4d803b73 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 31 Aug 1999 22:18:17 +0000 Subject: disable magic sysrq by default --- rc.d/rc.sysinit | 5 +++++ sysconfig.txt | 2 ++ sysconfig/init | 2 ++ 3 files changed, 9 insertions(+) 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 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 -- cgit v1.2.1