/[baselayout]/branches/rc-scripts-1_6/init.d/numlock
Gentoo

Contents of /branches/rc-scripts-1_6/init.d/numlock

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1231 - (show annotations) (download)
Mon Jun 13 02:25:31 2005 UTC (9 years, 7 months ago) by vapier
File size: 670 byte(s)
merge cvs Header removal from trunk
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:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20