Thanks for the comments, I enabled numlock on early bootup and also on TTYs.
For the TTYs I edited the rc.local file.
/etc/rc.local
Code: Select all
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
INITTY=/dev/tty[1-8]
for tty in $INITTY; do
setleds -D +num < $tty
done
exit 0
And for the early bootup
I edited a hook script to include setleds into the initramfs.
/etc/initramfs-tools/hooks/setleds
Code: Select all
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
. /usr/share/initramfs-tools/hook-functions
# Begin real processing below this line
copy_exec /usr/bin/setleds /bin
exit 0
And I edited a boot script placed in init-premount.
/etc/initramfs-tools/scripts/init-premount/start-numlock
Code: Select all
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
#. /usr/share/initramfs-tools/hook-functions
# Begin real processing below this line
/bin/setleds -D +num
exit 0
Now the 3 scripts has execute permissions.
Finally I ran
I'm happy with the result because It works on the early boot, and TTYs.
I'll keep looking to get it enabled only on tty6 after the early boot.
Thanks a lot.