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

Contents of /trunk/init.d/numlock

Parent Directory Parent Directory | Revision Log Revision Log


Revision 465 - (show annotations) (download)
Sun Feb 15 20:01:09 2004 UTC (15 years, 8 months ago) by azarah
File size: 822 byte(s)
Add RC_TTY_NUMBER to /etc/conf.d/rc to configure how many tty devices
are used in scripts such as consolefonts, numlock, etc.  This should
close bug #39863.

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