aboutsummaryrefslogtreecommitdiffstats
path: root/numlock.sh
diff options
context:
space:
mode:
authorChmouel Boudjnah <chmouel@mandriva.org>2000-04-05 16:34:26 +0000
committerChmouel Boudjnah <chmouel@mandriva.org>2000-04-05 16:34:26 +0000
commitd42a67c192d2c69561efec5cc1a33c4ce1db1ccd (patch)
treeee59bc4255c17ee5dac11be247ceff22ce6b7abc /numlock.sh
parentdaa6a8ea90487345093fb76b904d069e2ba9cf55 (diff)
downloadnumlock-d42a67c192d2c69561efec5cc1a33c4ce1db1ccd.tar
numlock-d42a67c192d2c69561efec5cc1a33c4ce1db1ccd.tar.gz
numlock-d42a67c192d2c69561efec5cc1a33c4ce1db1ccd.tar.bz2
numlock-d42a67c192d2c69561efec5cc1a33c4ce1db1ccd.tar.xz
numlock-d42a67c192d2c69561efec5cc1a33c4ce1db1ccd.zip
Initial revisionCookertopic/MandrakeSoft
Diffstat (limited to 'numlock.sh')
-rwxr-xr-xnumlock.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/numlock.sh b/numlock.sh
new file mode 100755
index 0000000..39781d1
--- /dev/null
+++ b/numlock.sh
@@ -0,0 +1,10 @@
+# Linux-Mandrake configuration.
+# ReLock the NumLock key if /etc/rc.d/init.d/NumLock has been runned
+# This is needed as login reset the tty
+
+MY_TTY=`tty`
+case $MY_TTY in
+ /dev/tty[0-9]*) [ -f /etc/sysconfig/NumLock ] && setleds -D +num < $MY_TTY;;
+ /dev/pts/[0-9]*) [ "XX$DISPLAY" != "XX" ] && [ -x /usr/X11R6/bin/enable_X11_numlock ] && /usr/X11R6/bin/enable_X11_numlock
+esac
+unset MY_TTY \ No newline at end of file