summaryrefslogtreecommitdiff
blob: 22654f01552c5e0c93fd4300e809d057f15fa5ec (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-2005 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