/[vps]/baselayout-vserver/trunk/init.d/numlock
Gentoo

Contents of /baselayout-vserver/trunk/init.d/numlock

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations) (download)
Sat Sep 3 16:10:27 2005 UTC (9 years, 3 months ago) by hollow
File size: 670 byte(s)
import initial baselayout sources (1.12.0_pre8)
1 #!/sbin/runscript
2 # Copyright 1999-2005 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4
5 depend() {
6 need localmount
7 }
8
9 start() {
10 ebegin "Enabling numlock on ttys"
11 local dev
12 [[ -d /dev/vc ]] \
13 && dev=/dev/vc/ \
14 || dev=/dev/tty
15 for tty in $(seq 1 "${RC_TTY_NUMBER}") ; do
16 setleds -D +num < ${dev}${tty} &> /dev/null
17 done
18 eend $? "Failed to enable numlock"
19 }
20
21 stop() {
22 ebegin "Disabling numlock on ttys"
23 local dev
24 [[ -d /dev/vc ]] \
25 && dev=/dev/vc/ \
26 || dev=/dev/tty
27 for tty in $(seq 1 "${RC_TTY_NUMBER}") ; do
28 setleds -D -num < ${dev}${tty} &> /dev/null
29 done
30 eend $? "Failed to disable numlock"
31 }
32
33
34 # vim:ts=4

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.20