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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE> [Mageia-sysadm] [415] Import cleaned numlock
</TITLE>
<LINK REL="Index" HREF="index.html" >
<LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B415%5D%20Import%20cleaned%20numlock&In-Reply-To=%3C20110203223852.C83453FF13%40valstar.mageia.org%3E">
<META NAME="robots" CONTENT="index,nofollow">
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
<LINK REL="Previous" HREF="002551.html">
<LINK REL="Next" HREF="002552.html">
</HEAD>
<BODY BGCOLOR="#ffffff">
<H1>[Mageia-sysadm] [415] Import cleaned numlock</H1>
<B>root at mageia.org</B>
<A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B415%5D%20Import%20cleaned%20numlock&In-Reply-To=%3C20110203223852.C83453FF13%40valstar.mageia.org%3E"
TITLE="[Mageia-sysadm] [415] Import cleaned numlock">root at mageia.org
</A><BR>
<I>Thu Feb 3 23:38:52 CET 2011</I>
<P><UL>
<LI>Previous message: <A HREF="002551.html">[Mageia-sysadm] [414] Use msgmerge on the po files
</A></li>
<LI>Next message: <A HREF="002552.html">[Mageia-sysadm] [416] Import cleaned system-config-printer
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#2545">[ date ]</a>
<a href="thread.html#2545">[ thread ]</a>
<a href="subject.html#2545">[ subject ]</a>
<a href="author.html#2545">[ author ]</a>
</LI>
</UL>
<HR>
<!--beginarticle-->
<PRE>Revision: 415
Author: dmorgan
Date: 2011-02-03 23:38:52 +0100 (Thu, 03 Feb 2011)
Log Message:
-----------
Import cleaned numlock
Added Paths:
-----------
numlock/
numlock/CLEANUP_PROGRESS.txt
numlock/trunk/
numlock/trunk/Makefile
numlock/trunk/enable_X11_numlock.c
numlock/trunk/man/
numlock/trunk/man/C/
numlock/trunk/man/C/enable_X11_numlock.1
numlock/trunk/man/cs/
numlock/trunk/man/cs/enable_X11_numlock.1
numlock/trunk/man/et/
numlock/trunk/man/et/enable_X11_numlock.1
numlock/trunk/man/eu/
numlock/trunk/man/eu/enable_X11_numlock.1
numlock/trunk/man/fi/
numlock/trunk/man/fi/enable_X11_numlock.1
numlock/trunk/man/fr/
numlock/trunk/man/fr/enable_X11_numlock.1
numlock/trunk/man/it/
numlock/trunk/man/it/enable_X11_numlock.1
numlock/trunk/man/nl/
numlock/trunk/man/nl/enable_X11_numlock.1
numlock/trunk/man/ru/
numlock/trunk/man/ru/enable_X11_numlock.1
numlock/trunk/man/uk/
numlock/trunk/man/uk/enable_X11_numlock.1
numlock/trunk/numlock.init
numlock/trunk/numlock.sh
numlock/trunk/numlock.xinit
Added: numlock/CLEANUP_PROGRESS.txt
===================================================================
--- numlock/CLEANUP_PROGRESS.txt (rev 0)
+++ numlock/CLEANUP_PROGRESS.txt 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,3 @@
+- License is GPL according to the relevant rpm spec written by Mandriva
+- Occurances of "Linux Mandrake Manual" (with slight variations) in the bundles
+ manpages
Property changes on: numlock/CLEANUP_PROGRESS.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: numlock/trunk/Makefile
===================================================================
--- numlock/trunk/Makefile (rev 0)
+++ numlock/trunk/Makefile 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,42 @@
+NAME = numlock
+VERSION = 2.1.2
+
+TOP=
+CFLAGS=-g -O2 -Wall
+CC=gcc
+FLAGS=-lX11 -lXtst
+
+enable_X11_numlock: enable_X11_numlock.c
+ $(CC) $(CFLAGS) $(FLAGS) -o $@ $<
+
+all: enable_X11_numlock
+
+clean:
+ rm -f enable_X11_numlock core *.o
+
+install: all
+ install -d $(TOP)/usr/{bin,share/man/man1}/
+ install -d $(TOP)/etc/profile.d
+ install -d $(TOP)/$(INITRDDIR)
+ install -d $(TOP)/etc/X11/xinit.d
+
+ install -m755 enable_X11_numlock $(TOP)/usr/bin
+ install -m755 man/C/enable_X11_numlock.1 $(TOP)/usr/share/man/man1/
+ for i in man/??* ; do \
+ install -d $(TOP)/usr/share/man/`basename $$i`/man1 ; \
+ install -m 644 $$i/*.1 $(TOP)/usr/share/man/`basename $$i`/man1 ; \
+ done
+
+ install -m755 numlock.init $(TOP)/$(INITRDDIR)/$(NAME)
+ install -m755 numlock.sh $(TOP)/etc/profile.d/
+ install -m755 numlock.xinit $(TOP)/etc/X11/xinit.d/numlock
+
+dis: clean
+ rm -rf $(NAME)-$(VERSION) ../$(NAME)-$(VERSION).tar*
+ mkdir -p $(NAME)-$(VERSION)
+ find . -not -name "$(NAME)-$(VERSION)"|cpio -pd $(NAME)-$(VERSION)/
+ find $(NAME)-$(VERSION) -type d -name .svn -o -name unused |xargs rm -rf
+ tar cf ../$(NAME)-$(VERSION).tar $(NAME)-$(VERSION)
+ bzip2 -9f ../$(NAME)-$(VERSION).tar
+ chmod 644 ../$(NAME)-$(VERSION).tar.bz2
+ rm -rf $(NAME)-$(VERSION)
Property changes on: numlock/trunk/Makefile
___________________________________________________________________
Added: svn:eol-style
+ native
Added: numlock/trunk/enable_X11_numlock.c
===================================================================
--- numlock/trunk/enable_X11_numlock.c (rev 0)
+++ numlock/trunk/enable_X11_numlock.c 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,119 @@
+/****************************************************************************
+
+ NumlockX - (C) 2000 Lubos Lunak <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">l.lunak at email.cz</A>>
+ Released under the terms of the GNU General Public License
+
+ main.c -
+
+ $Id: enable_X11_numlock.c 158725 2001-03-29 11:17:40Z gc $
+
+****************************************************************************/
+
+/* The NumLock state detection code is originally from KLeds by
+ Hans Matzen <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">hans at tm.informatik.uni-frankfurt.de</A>> */
+
+#define __main_C
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <X11/extensions/XTest.h>
+#include <X11/keysym.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#define HAS_XKB 1
+#ifdef HAS_XKB
+#include <X11/XKBlib.h>
+#endif
+
+void usage( const char* argv0 )
+ {
+ printf( "NumlockX - (C) 2000 Lubos Lunak <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">l.lunak at email.cz</A>>\n\n"
+#ifdef HAS_XKB
+ "Usage : %s [on|off|switch]\n"
+ "on - sets NumLock on in X (default)\n"
+ "off - sets NumLock off in X\n"
+ "switch - changes NumLock state in X\n"
+#else
+ "Usage : %s\n"
+ "Changes NumLock state in X\n"
+ "( NumLock state detection not available,"
+ " compiled without XKB )\n"
+#endif
+ "\n"
+ , argv0 );
+ }
+
+Display* disp;
+
+#ifdef HAS_XKB
+int get_numlock_state()
+ {
+ unsigned int states;
+ if( XkbGetIndicatorState( disp, XkbUseCoreKbd, &states) != Success )
+ {
+ printf("Error while reading Indicator status\n");
+ XCloseDisplay( disp );
+ exit( 3 );
+ }
+ return states & 0x02; /* NumLock appears to be bit1 */
+ }
+#endif
+
+void change_numlock()
+ {
+ XTestFakeKeyEvent( disp, XKeysymToKeycode( disp, XK_Num_Lock ), True, CurrentTime );
+ XTestFakeKeyEvent( disp, XKeysymToKeycode( disp, XK_Num_Lock ), False, CurrentTime );
+ }
+
+#ifdef HAS_XKB
+void set_on()
+ {
+ if( !get_numlock_state())
+ change_numlock();
+ }
+
+void set_off()
+ {
+ if( get_numlock_state())
+ change_numlock();
+ }
+#endif
+
+int main( int argc, char* argv[] )
+ {
+ if( argc > 2 )
+ {
+ usage( argv[ 0 ] );
+ return 1;
+ }
+ disp = XOpenDisplay( NULL );
+ if( disp == NULL )
+ {
+ printf( "Error opening display\n" );
+ return 2;
+ }
+ if( argc == 1 )
+#if HAS_XKB
+ set_on();
+ else if( strncmp( argv[ 1 ], "on", 2 ) == 0 )
+ set_on();
+ else if( strncmp( argv[ 1 ], "of", 2 ) == 0 )
+ set_off();
+#else
+ change_numlock(); /* if( argc == 1 ) */
+#endif
+ else if( strncmp( argv[ 1 ], "switch", 6 ) == 0 )
+ change_numlock();
+ else
+ {
+ usage( argv[ 0 ] );
+ XCloseDisplay( disp );
+ return 1;
+ }
+ XCloseDisplay( disp );
+ return 0;
+ }
Property changes on: numlock/trunk/enable_X11_numlock.c
___________________________________________________________________
Added: svn:eol-style
+ native
Added: numlock/trunk/man/C/enable_X11_numlock.1
===================================================================
--- numlock/trunk/man/C/enable_X11_numlock.1 (rev 0)
+++ numlock/trunk/man/C/enable_X11_numlock.1 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,17 @@
+.TH Enable_X11_Numlock "9 Jan 2001" " Mageia Manual"
+.SH NAME
+enable_X11_numlock \- Enable X11 numlock
+.SH SYNOPSIS
+.BI enable_X11_numlock
+[on]
+[off]
+[switch]
+.SH DESCRIPTION
+The command
+.B enable_X11_numlock
+turns on, off, or switches the numlock under X. Default behaviour (e.g.
+when no option is given) is to turn it on.
+
+.SH "SEE ALSO"
+
+.BR X (1).
Added: numlock/trunk/man/cs/enable_X11_numlock.1
===================================================================
--- numlock/trunk/man/cs/enable_X11_numlock.1 (rev 0)
+++ numlock/trunk/man/cs/enable_X11_numlock.1 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,16 @@
+.TH Enable_X11_Numlock "9 Led 2001" "Manuál Mageia "
+.SH NÁZEV
+enable_X11_numlock \- Zapne klávesu klávesu NumLock v systému X11
+.SH SYNAPSE
+.BI enable_X11_numlock
+[on]
+[off]
+[switch]
+.SH POPIS
+Příkaz
+.B enable_X11_numlock
+zapne, vypne, nebo přepne klávesu NumLock v systému X. Výchozí chování (pokud není zadán žádný parametr) je klávesu NumLock zapnout.
+
+.SH "VIZ TAKÉ"
+
+.BR X(1).
Added: numlock/trunk/man/et/enable_X11_numlock.1
===================================================================
--- numlock/trunk/man/et/enable_X11_numlock.1 (rev 0)
+++ numlock/trunk/man/et/enable_X11_numlock.1 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,14 @@
+.TH "Enable_X11_Numlock" "9. jaanuar 2001" "Mageia i käsiraamat" "" ""
+.SH "NIMI"
+enable_X11_numlock \- X11 numlocki lubamine
+.SH "KOKKUVÕTE"
+.BI enable_X11_numlock
+[on]
+[off]
+[switch]
+.SH "KIRJELDUS"
+Käsk
+.B enable_X11_numlock
+lülitab numlock\-i X\-i all sisse, välja või lülitab vastavalt ümber. Vaikimisi (st ilma võtmeta) lülitatakse see sisse.
+.SH "VAATA KA"
+.BR X (1).
Added: numlock/trunk/man/eu/enable_X11_numlock.1
===================================================================
--- numlock/trunk/man/eu/enable_X11_numlock.1 (rev 0)
+++ numlock/trunk/man/eu/enable_X11_numlock.1 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,18 @@
+.TH Enable_X11_Numlock "2001eko urtarrilak 9" " Mageia-ren eskuliburua"
+.SH IZENA
+enable_X11_numlock \- X11 zenbaki-blokeoa gaitzen du
+.SH LABURPENA
+.BI enable_X11_numlock
+[aktibatu]
+[desaktibatu]
+[aldatu]
+.SH AZALPENA
+Komando honek,
+.BI enable_X11_numlock,
+Xren araberako zenbaki-blokeoa aktibatu, desaktibatu edo aldatu egiten du. Lehenetsita dagoen jokabidea
+(inolako aukerarik egiten ez denean) aktibatuta egotea da.
+
+.SH "IKUSI BAITA ERE"
+
+.BR X (1).
+
Added: numlock/trunk/man/fi/enable_X11_numlock.1
===================================================================
--- numlock/trunk/man/fi/enable_X11_numlock.1 (rev 0)
+++ numlock/trunk/man/fi/enable_X11_numlock.1 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,15 @@
+.TH Enable_X11_Numlock "9 Jan 2001" "Mageia Manual"
+.SH NIMI
+enable_X11_numlock \- Ota X11 numlock käyttöön
+.SH YLEISKATSAUS
+.BI enable_X11_numlock
+[on]
+[off]
+[switch]
+.SH KUVAUS
+Komento
+.B enable_X11_numlock
+kytkee päälle/pois päältä tai vaihtaa numlock:in tilaa X:än alla.
+Oletustoiminto (jos optiota ei annettu) on numlock:in päällekytkeminen.
+.SH "KATSO MYÖS"
+.BR X (1).
Added: numlock/trunk/man/fr/enable_X11_numlock.1
===================================================================
--- numlock/trunk/man/fr/enable_X11_numlock.1 (rev 0)
+++ numlock/trunk/man/fr/enable_X11_numlock.1 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,18 @@
+.TH Enable_X11_Numlock "9 Jan 2001" " Mageia Manual"
+.SH NAME
+enable_X11_numlock \- Active la fonction « numlock » dans X11
+.SH SYNOPSIS
+.BI enable_X11_numlock
+[on]
+[off]
+[switch]
+.SH DESCRIPTION
+La commande
+.B enable_X11_numlock
+active, désactive, ou commute la fonction « numlock » dans X, respectivement.
+Le comportement par défaut (par ex. quand aucune option n'est spécifiée) est
+de l'activer.
+
+.SH "VOIR AUSSI"
+
+.BR X (1).
Added: numlock/trunk/man/it/enable_X11_numlock.1
===================================================================
--- numlock/trunk/man/it/enable_X11_numlock.1 (rev 0)
+++ numlock/trunk/man/it/enable_X11_numlock.1 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,17 @@
+.TH Enable_X11_Numlock "9 gen 2001" " Mageia Manual"
+.SH NOME
+enable_X11_numlock \- Abilita il numlock in X11
+.SH SINTASSI
+.BI enable_X11_numlock
+[on]
+[off]
+[switch]
+.SH DESCRIZIONE
+Il comando
+.B enable_X11_numlock
+attiva, disattiva o scambia lo stato del numlock sotto X. Il comportamento predefinito (per es.
+se non si specifica un opzione) è di attivarlo.
+
+.SH "VEDI ANCHE"
+
+.BR X (1).
Added: numlock/trunk/man/nl/enable_X11_numlock.1
===================================================================
--- numlock/trunk/man/nl/enable_X11_numlock.1 (rev 0)
+++ numlock/trunk/man/nl/enable_X11_numlock.1 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,17 @@
+.TH Enable_X11_Numlock "9 Jan 2001" " Mageia Manual"
+.SH NAME
+enable_X11_numlock \- schakelt numlock onder X11 in en uit
+.SH SYNOPSIS
+.BI enable_X11_numlock
+[on]
+[off]
+[switch]
+.SH BESCHRIJVING
+De opdracht
+.B enable_X11_numlock
+schakelt numlock onder X in, uit of om. Standaard (dat wil zeggen:
+zonder opgegeven optie) wordt numlock ingeschakeld.
+
+.SH "ZIE OOK"
+
+.BR X (1).
Added: numlock/trunk/man/ru/enable_X11_numlock.1
===================================================================
--- numlock/trunk/man/ru/enable_X11_numlock.1 (rev 0)
+++ numlock/trunk/man/ru/enable_X11_numlock.1 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,20 @@
+.TH Enable_X11_Numlock "9 Jan 2001" " Mageia Manual"
+.SH НАЗВАНИЕ
+enable_X11_numlock \- включает X11 numlock
+.SH СИНТАКСИС
+.BI enable_X11_numlock
+[on]
+[off]
+[switch]
+.SH ОПИСАНИЕ
+Команда
+.B enable_X11_numlock
+включает, выключает или переключает numlock под Иксами. Действием по
+умолчанию (например, когда опции не заданы) является включение.
+
+.SH "СМ. ТАКЖЕ"
+
+.BR X (1).
+
+.SH ПЕРЕВОД
+Павел Марьянов <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">acid_jack at ukr.net</A>>
Added: numlock/trunk/man/uk/enable_X11_numlock.1
===================================================================
--- numlock/trunk/man/uk/enable_X11_numlock.1 (rev 0)
+++ numlock/trunk/man/uk/enable_X11_numlock.1 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,22 @@
+.TH Enable_X11_Numlock "9 Jan 2001" " Mageia Manual"
+.SH НАЗВА
+enable_X11_numlock \- Дозволити фіксацію цифрової клавіатури в X11
+.SH ВИКОРИСТАННЯ
+.BI enable_X11_numlock
+[on]
+[off]
+[switch]
+.SH ОПИС
+Команда
+.B enable_X11_numlock
+вмикає, вимикає чи перемикає фіксатор цифрової додаткової клавіатури в
+X. Стандартний режим роботи (тобто коли не вказаний жоден з параметрів)
+\- ввімкнути фіксатор.
+
+.SH "ДИВ. ТАКОЖ"
+
+.BR X (1).
+.SH
+ПЕРЕКЛАД
+.br
+Дмитро Ковальов, <<A HREF="https://www.mageia.org/mailman/listinfo/mageia-sysadm">kov at tokyo.emai.ne.jp</A>>
Added: numlock/trunk/numlock.init
===================================================================
--- numlock/trunk/numlock.init (rev 0)
+++ numlock/trunk/numlock.init 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,69 @@
+#!/bin/sh
+#
+# Startup script for NumLock
+#
+# description: Locks NumLock key at init runlevel change
+# chkconfig: 3457 29 15
+#
+### BEGIN INIT INFO
+# Provides: numlock
+# Default-Start: 3 4 5 7
+# Short-Description: Locks NumLock key at init runlevel change
+# Description: Locks NumLock key at init runlevel change
+### END INIT INFO
+
+# Source function library.
+. /etc/rc.d/init.d/functions
+
+# The following file make bash to relock the numlock key when logging
+# since login unlock it.
+SYSCONF_FILE=/var/lock/subsys/numlock
+#SYSCONF_FILE=/etc/sysconfig/numlock
+
+# See how we were called.
+case "$1" in
+ start)
+ echo -n "Starting numlock: "
+ echo_success
+ echo
+ touch $SYSCONF_FILE
+
+ for tty in /dev/tty[1-8]; do
+ setleds -D +num < $tty
+ done
+
+ ;;
+ stop)
+ echo -n "Disabling numlocks on ttys: "
+ for tty in /dev/tty[1-8]; do
+ setleds -D -num < $tty
+ done
+ echo_success
+ echo
+ rm -f $SYSCONF_FILE
+ ;;
+ status)
+# status NumLock
+# echo "dead status as reported is normal since NumLock doesn't need to daemonize"
+ if [ -f $SYSCONF_FILE ]
+ then
+ echo "numlock is enabled"
+ else
+ echo "numlock is disabled"
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ reload)
+ echo -n "Reloading numlock: "
+ $0 start
+ echo
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload|status}"
+ exit 1
+esac
+
+exit 0
Property changes on: numlock/trunk/numlock.init
___________________________________________________________________
Added: svn:executable
+ *
Added: numlock/trunk/numlock.sh
===================================================================
--- numlock/trunk/numlock.sh (rev 0)
+++ numlock/trunk/numlock.sh 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,9 @@
+# Mageia configuration.
+# ReLock the NumLock key if /etc/rc.d/init.d/numlock has been run.
+# This is needed because login resets the tty.
+
+MY_TTY=`tty`
+case $MY_TTY in
+ /dev/tty[0-9]*) [ -f /var/lock/subsys/numlock ] && setleds -D +num < $MY_TTY;;
+esac
+unset MY_TTY
Property changes on: numlock/trunk/numlock.sh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:eol-style
+ native
Added: numlock/trunk/numlock.xinit
===================================================================
--- numlock/trunk/numlock.xinit (rev 0)
+++ numlock/trunk/numlock.xinit 2011-02-03 22:38:52 UTC (rev 415)
@@ -0,0 +1,28 @@
+#!/bin/sh
+#---------------------------------------------------------------
+# Project : Mandrake
+# Module : numlock
+# File : numlock.xinit
+# Version : $Id: numlock.xinit 241829 2008-04-03 04:15:25Z blino $
+# Author : Frederic Lepied
+# Created On : Wed Apr 12 08:39:24 2000
+#---------------------------------------------------------------
+
+#
+# The following code used to execute enable_numlock if numlock was enabled
+# on this host. This screwed hosts which did not use numlock (laptops)
+# but which tried to create XDMCP sessions to this host, as numlock would
+# be turned on unconditionally.
+#
+# The following code detects a $DISPLAY host other than what would be
+# expected for a local X session on this host, and exempts it from the
+# automatic execution of numlock.
+#
+DISPHOST=${DISPLAY%%:*}
+if [ "$DISPHOST" = "" -o "$DISPHOST" = "localhost" -o "$DISPHOST" = "$HOSTNAME" ]; then
+ if [ -f /var/lock/subsys/numlock -a -x /usr/bin/enable_X11_numlock ]; then
+ /usr/bin/enable_X11_numlock
+ fi
+fi
+
+# numlock ends here
Property changes on: numlock/trunk/numlock.xinit
___________________________________________________________________
Added: svn:executable
+ *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110203/118bc66c/attachment-0001.html>
</PRE>
<!--endarticle-->
<HR>
<P><UL>
<!--threads-->
<LI>Previous message: <A HREF="002551.html">[Mageia-sysadm] [414] Use msgmerge on the po files
</A></li>
<LI>Next message: <A HREF="002552.html">[Mageia-sysadm] [416] Import cleaned system-config-printer
</A></li>
<LI> <B>Messages sorted by:</B>
<a href="date.html#2545">[ date ]</a>
<a href="thread.html#2545">[ thread ]</a>
<a href="subject.html#2545">[ subject ]</a>
<a href="author.html#2545">[ author ]</a>
</LI>
</UL>
<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm
mailing list</a><br>
</body></html>
|