1 |
flameeyes 11/04/04 12:20:55 |
2 |
|
3 |
Modified: ekey-egd-linux.conf ekey-egd-linux.init |
4 |
Log: |
5 |
Improve init script and defaults: default to 8888 for port (used by other EGD services); set variables by default if they are not set by the configuration file; only set watermark if it is configured; start after ekeyd. |
6 |
|
7 |
(Portage version: 2.2.0_alpha29/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 app-crypt/ekey-egd-linux/files/ekey-egd-linux.conf |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.conf?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.conf?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.conf?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: ekey-egd-linux.conf |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.conf,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -u -r1.1 -r1.2 |
22 |
--- ekey-egd-linux.conf 23 Oct 2010 17:19:32 -0000 1.1 |
23 |
+++ ekey-egd-linux.conf 4 Apr 2011 12:20:55 -0000 1.2 |
24 |
@@ -1,10 +1,12 @@ |
25 |
-# Host IP address to connect to. |
26 |
-HOST="localhost" |
27 |
+# Configuration file for ekey-egd-linux |
28 |
+ |
29 |
+# Hostname or IP address to connect to. |
30 |
+#HOST="localhost" |
31 |
# Port number to connect to. |
32 |
-PORT="1234" |
33 |
+#PORT="8888" |
34 |
# Time between reconnect attempts. |
35 |
-RECONNECTINTERVAL=10 |
36 |
+#RECONNECTINTERVAL=10 |
37 |
# Set the number of 1024 bit blocks to request each time |
38 |
-BLOCKS=2 |
39 |
+#BLOCKS=2 |
40 |
# Low level entropy to trigger egd-linux entropy read |
41 |
WATERMARK=1024 |
42 |
|
43 |
|
44 |
|
45 |
1.2 app-crypt/ekey-egd-linux/files/ekey-egd-linux.init |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init?rev=1.2&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init?rev=1.2&content-type=text/plain |
49 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init?r1=1.1&r2=1.2 |
50 |
|
51 |
Index: ekey-egd-linux.init |
52 |
=================================================================== |
53 |
RCS file: /var/cvsroot/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init,v |
54 |
retrieving revision 1.1 |
55 |
retrieving revision 1.2 |
56 |
diff -u -r1.1 -r1.2 |
57 |
--- ekey-egd-linux.init 23 Oct 2010 17:19:32 -0000 1.1 |
58 |
+++ ekey-egd-linux.init 4 Apr 2011 12:20:55 -0000 1.2 |
59 |
@@ -1,10 +1,16 @@ |
60 |
#!/sbin/runscript |
61 |
-# Copyright 2009-2010 Gentoo Foundation |
62 |
+# Copyright 1999-2011 Gentoo Foundation |
63 |
# Distributed under the terms of the GNU General Public License v2 |
64 |
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init,v 1.1 2010/10/23 17:19:32 flameeyes Exp $ |
65 |
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekey-egd-linux/files/ekey-egd-linux.init,v 1.2 2011/04/04 12:20:55 flameeyes Exp $ |
66 |
+ |
67 |
+: ${HOST:=localhost} |
68 |
+: ${PORT:=8888} |
69 |
+: ${RECONNECTINTERVAL:=10} |
70 |
+: ${BLOCKS:=2} |
71 |
|
72 |
depend() { |
73 |
use net |
74 |
+ after ekeyd |
75 |
} |
76 |
|
77 |
start() { |
78 |
@@ -16,7 +22,10 @@ |
79 |
-r ${RECONNECTINTERVAL} \ |
80 |
-b ${BLOCKS} \ |
81 |
-D "/var/run/${SVCNAME}.pid" |
82 |
- sysctl kernel.random.write_wakeup_threshold=$WATERMARK >/dev/null 2>&1 |
83 |
+ |
84 |
+ [ -n "${WATERMARK}" ] && \ |
85 |
+ sysctl "kernel.random.write_wakeup_threshold=$WATERMARK" >/dev/null 2>&1 |
86 |
+ |
87 |
eend $? |
88 |
} |
89 |
|
90 |
@@ -27,4 +36,3 @@ |
91 |
--exec /usr/libexec/ekey-egd-linux |
92 |
eend $? |
93 |
} |
94 |
- |