aboutsummaryrefslogtreecommitdiffstats
path: root/numlock.sh
blob: 39781d16fddc96b1a86bd7dfb8be51c1cd302200 (plain)
1
2
3
4
5
6
7
8
9
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