aboutsummaryrefslogtreecommitdiff
path: root/init.d.Linux/numlock
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-23 22:23:20 +0000
committerRoy Marples <roy@marples.name>2007-11-23 22:23:20 +0000
commit206f7096e0b4c155b77a64b91990a5d8c91c9764 (patch)
tree36a939681543823bcdf2dfea77d2aeeb0484fbf3 /init.d.Linux/numlock
parent168fa73a49553a90009b9077607593e9a5a77565 (diff)
Fix var names
Diffstat (limited to 'init.d.Linux/numlock')
-rwxr-xr-xinit.d.Linux/numlock4
1 files changed, 3 insertions, 1 deletions
diff --git a/init.d.Linux/numlock b/init.d.Linux/numlock
index 7bbd1314..5b2bca99 100755
--- a/init.d.Linux/numlock
+++ b/init.d.Linux/numlock
@@ -26,6 +26,8 @@
description="Turns numlock on for the consoles."
+ttyn=${rc_tty_number:-${RC_TTY_NUMBER}:-12}
+
depend() {
need localmount
}
@@ -36,7 +38,7 @@ _setleds() {
local dev=/dev/tty t= i=1 retval=0
[ -d /dev/vc ] && dev=/dev/vc/
- while [ ${i} -le ${RC_TTY_NUMBER:-11} ] ; do
+ while [ ${i} -le ${ttyn} ] ; do
setleds -D "$1"num < ${dev}${i} || retval=1
i=$((${i} + 1))
done