1 |
flameeyes 09/09/28 18:29:36 |
2 |
|
3 |
Modified: ekeyd.init |
4 |
Added: ekey-ulusbd.conf ekey-ulusbd.init |
5 |
Log: |
6 |
Bump already, add init script for the userland USB daemon, and move the two daemon executables in /usr/libexec. |
7 |
(Portage version: 2.2_rc42/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 app-crypt/ekeyd/files/ekeyd.init |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: ekeyd.init |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -u -r1.1 -r1.2 |
22 |
--- ekeyd.init 28 Sep 2009 10:59:07 -0000 1.1 |
23 |
+++ ekeyd.init 28 Sep 2009 18:29:36 -0000 1.2 |
24 |
@@ -1,7 +1,7 @@ |
25 |
#!/sbin/runscript |
26 |
# Copyright 2009 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init,v 1.1 2009/09/28 10:59:07 flameeyes Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init,v 1.2 2009/09/28 18:29:36 flameeyes Exp $ |
30 |
|
31 |
INSTANCE="${SVCNAME#*.}" |
32 |
if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "ekeyd" ]; then |
33 |
@@ -9,14 +9,14 @@ |
34 |
fi |
35 |
|
36 |
depend() { |
37 |
- use udev |
38 |
+ use udev ekey-ulusbd |
39 |
} |
40 |
|
41 |
start() { |
42 |
ebegin "Starting EntropyKey daemon" |
43 |
start-stop-daemon \ |
44 |
--start --pidfile "/var/run/${SVCNAME}.pid" \ |
45 |
- --exec /usr/sbin/ekeyd -- \ |
46 |
+ --exec /usr/libexec/ekeyd -- \ |
47 |
-f "/etc/entropykey/${INSTANCE}.conf" \ |
48 |
-p "/var/run/${SVCNAME}.pid" |
49 |
eend $? |
50 |
@@ -26,7 +26,7 @@ |
51 |
ebegin "Stopping EntropyKey daemon" |
52 |
start-stop-daemon \ |
53 |
--stop --pidfile "/var/run/${SVCNAME}.pid" \ |
54 |
- --exec /usr/sbin/ekeyd |
55 |
+ --exec /usr/libexec/ekeyd |
56 |
eend $? |
57 |
} |
58 |
|
59 |
|
60 |
|
61 |
|
62 |
1.1 app-crypt/ekeyd/files/ekey-ulusbd.conf |
63 |
|
64 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf?rev=1.1&view=markup |
65 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf?rev=1.1&content-type=text/plain |
66 |
|
67 |
Index: ekey-ulusbd.conf |
68 |
=================================================================== |
69 |
# Copyright 2009 Gentoo Foundation |
70 |
# Distributed under the terms of the GNU General Public License v2 |
71 |
# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf,v 1.1 2009/09/28 18:29:36 flameeyes Exp $ |
72 |
|
73 |
# The userland USB daemon has to know the USB path of the EntopyKey to |
74 |
# work properly; in alternative to providing these statically, they |
75 |
# can be found by giving the serial of the key. |
76 |
# |
77 |
# The serial will also be used to set the default path to open the |
78 |
# socket to. |
79 |
|
80 |
EKEY_SERIAL="" |
81 |
#USB_BUS="" |
82 |
#USB_DEV="" |
83 |
|
84 |
SOCKET_PATH="/var/run/ekey.ulusbd.${EKEY_SERIAL}" |
85 |
|
86 |
|
87 |
|
88 |
1.1 app-crypt/ekeyd/files/ekey-ulusbd.init |
89 |
|
90 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init?rev=1.1&view=markup |
91 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init?rev=1.1&content-type=text/plain |
92 |
|
93 |
Index: ekey-ulusbd.init |
94 |
=================================================================== |
95 |
#!/sbin/runscript |
96 |
# Copyright 2009 Gentoo Foundation |
97 |
# Distributed under the terms of the GNU General Public License v2 |
98 |
# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init,v 1.1 2009/09/28 18:29:36 flameeyes Exp $ |
99 |
|
100 |
INSTANCE="${SVCNAME#*.}" |
101 |
if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "ekey-ulusbd" ]; then |
102 |
INSTANCE="ekey-ulusbd" |
103 |
fi |
104 |
|
105 |
depend() { |
106 |
use udev |
107 |
} |
108 |
|
109 |
start() { |
110 |
if [ -z ${USB_BUS} ]; then |
111 |
local devdir=$(fgrep -l 20df /sys/bus/usb/devices/*/idVendor \ |
112 |
| xargs -n1 dirname \ |
113 |
| xargs -I{} fgrep -l 0001 {}/idProduct \ |
114 |
| xargs -n1 dirname \ |
115 |
| xargs -I{} fgrep -l ${EKEY_SERIAL} {}/serial \ |
116 |
| xargs -n1 dirname) |
117 |
USB_BUS=$(< ${devdir}/busnum) |
118 |
USB_DEV=$(< ${devdir}/devnum) |
119 |
fi |
120 |
|
121 |
ebegin "Starting EntropyKey Userland USB Daemon" |
122 |
start-stop-daemon \ |
123 |
--start --pidfile "/var/run/${SVCNAME}.pid" \ |
124 |
--exec /usr/libexec/ekey-ulusbd -- \ |
125 |
-P "/var/run/${SVCNAME}.pid" \ |
126 |
-p "${SOCKET_PATH}" \ |
127 |
-b $(printf %03d ${USB_BUS}) -d $(printf %03d ${USB_DEV}) -D |
128 |
eend $? |
129 |
} |
130 |
|
131 |
stop() { |
132 |
ebegin "Stopping EntropyKey daemon" |
133 |
start-stop-daemon \ |
134 |
--stop --pidfile "/var/run/${SVCNAME}.pid" \ |
135 |
--exec /usr/libexec/ekey-ulusbd |
136 |
eend $? |
137 |
} |