when defining more tty's in /etc/inittab the /etc/init.d/numlock is "difficult" to change Reproducible: Always Steps to Reproduce: 1.add more tty's in /etc/inittab 2.killall -HUP init 3.souce /etc/init.d/numlock 4./etc/init.d/numlock restart a beter way to do this is: --- /etc/init.d/numlock 2003-09-04 13:15:34.000000000 +0200 +++ /etc/init.d/._cfg0000_numlock 2003-09-08 05:21:07.000000000 +0200 @@ -10,18 +10,18 @@ start() { ebegin "Enabling numlock on ttys" - for tty in `seq 0 11` + for tty in /dev/tty[1-8] do - setleds -D +num < /dev/tty${tty} &>/dev/null + setleds -D +num < ${tty} &>/dev/null done eend $? "Failed to enable numlock" } stop() { ebegin "Disabling numlock on ttys" - for tty in `seq 0 11` + for tty in /dev/tty[1-8] do - setleds -D -num < /dev/tty${tty} &>/dev/null + setleds -D -num < ${tty} &>/dev/null done eend $? "Failed to disable numlock" }
sorry it should be : --- /etc/init.d/numlock 2003-09-04 13:15:34.000000000 +0200 +++ /etc/init.d/._cfg0000_numlock 2003-09-08 05:21:07.000000000 +0200 @@ -10,18 +10,18 @@ start() { ebegin "Enabling numlock on ttys" + for tty in `seq 0 11` - for tty in /dev/tty[1-8] do + setleds -D +num < /dev/tty${tty} &>/dev/null - setleds -D +num < ${tty} &>/dev/null done eend $? "Failed to enable numlock" } stop() { ebegin "Disabling numlock on ttys" + for tty in `seq 0 11` - for tty in /dev/tty[1-8] do + setleds -D -num < /dev/tty${tty} &>/dev/null - setleds -D -num < ${tty} &>/dev/null done eend $? "Failed to disable numlock" }
Why set it for tty0 ?
ignore the tty0 that is not the id behind the patch
Added to CVS.