/[baselayout]/trunk/init.d/numlock
Gentoo

Contents of /trunk/init.d/numlock

Parent Directory Parent Directory | Revision Log Revision Log


Revision 484 - (show annotations) (download)
Wed Apr 21 17:09:18 2004 UTC (15 years, 2 months ago) by vapier
File size: 821 byte(s)
update copyright years

1 #!/sbin/runscript
2 # Copyright 1999-2004 Gentoo Technologies, Inc.
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header$
5
6 depend() {
7 need localmount
8 }
9
10 start() {
11 ebegin "Enabling numlock on ttys"
12 for tty in $(seq 1 "${RC_TTY_NUMBER}")
13 do
14 if [ -e /dev/.devfsd ] || \
15 [ -e /dev/.udev -a -d /dev/vc ]
16 then
17 setleds -D +num < /dev/vc/${tty} &>/dev/null
18 else
19 setleds -D +num < /dev/tty${tty} &>/dev/null
20 fi
21 done
22 eend $? "Failed to enable numlock"
23 }
24
25 stop() {
26 ebegin "Disabling numlock on ttys"
27 for tty in $(seq 1 "${RC_TTY_NUMBER}")
28 do
29 if [ -e /dev/.devfsd ] || \
30 [ -e /dev/.udev -a -d /dev/vc ]
31 then
32 setleds -D -num < /dev/vc/${tty} &>/dev/null
33 else
34 setleds -D -num < /dev/tty${tty} &>/dev/null
35 fi
36 done
37 eend $? "Failed to disable numlock"
38 }
39
40
41 # 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