aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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