blob: 71922e8a663fb4f13f47b3871dbe7f75f646f763 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/sbin/runscript
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
depend() {
need localmount
}
start() {
ebegin "Enabling numlock on ttys"
local dev
[[ -d /dev/vc ]] \
&& dev=/dev/vc/ \
|| dev=/dev/tty
for tty in $(seq 1 "${RC_TTY_NUMBER}") ; do
setleds -D +num < ${dev}${tty} &> /dev/null
done
eend $? "Failed to enable numlock"
}
stop() {
ebegin "Disabling numlock on ttys"
local dev
[[ -d /dev/vc ]] \
&& dev=/dev/vc/ \
|| dev=/dev/tty
for tty in $(seq 1 "${RC_TTY_NUMBER}") ; do
setleds -D -num < ${dev}${tty} &> /dev/null
done
eend $? "Failed to disable numlock"
}
# vim:ts=4
|