Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-crypt/ekeyd/files: ekey-ulusbd.conf ekey-ulusbd.init
Date: Tue, 29 Sep 2009 12:03:23
Message-Id: E1MsbQP-0005Vb-R2@stork.gentoo.org
1 flameeyes 09/09/29 12:03:21
2
3 Modified: ekey-ulusbd.conf ekey-ulusbd.init
4 Log:
5 New revision, thanks to the comments from Rob Kendrick (upstream); the init script now uses lsusb, and is only installed for non-Linux systems, while the correct udev rules are installed on Linux. Add a check for the CDC driver, and also add warnings about both the userland USB and CDC options.
6 (Portage version: 2.2_rc42/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.2 app-crypt/ekeyd/files/ekey-ulusbd.conf
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf?rev=1.2&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf?rev=1.2&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf?r1=1.1&r2=1.2
14
15 Index: ekey-ulusbd.conf
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf,v
18 retrieving revision 1.1
19 retrieving revision 1.2
20 diff -u -r1.1 -r1.2
21 --- ekey-ulusbd.conf 28 Sep 2009 18:29:36 -0000 1.1
22 +++ ekey-ulusbd.conf 29 Sep 2009 12:03:21 -0000 1.2
23 @@ -1,6 +1,6 @@
24 # Copyright 2009 Gentoo Foundation
25 # Distributed under the terms of the GNU General Public License v2
26 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf,v 1.1 2009/09/28 18:29:36 flameeyes Exp $
27 +# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf,v 1.2 2009/09/29 12:03:21 flameeyes Exp $
28
29 # The userland USB daemon has to know the USB path of the EntopyKey to
30 # work properly; in alternative to providing these statically, they
31 @@ -13,4 +13,4 @@
32 #USB_BUS=""
33 #USB_DEV=""
34
35 -SOCKET_PATH="/var/run/ekey.ulusbd.${EKEY_SERIAL}"
36 +SOCKET_PATH="/var/run/ekey-ulusbd-${EKEY_SERIAL}"
37
38
39
40 1.2 app-crypt/ekeyd/files/ekey-ulusbd.init
41
42 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init?rev=1.2&view=markup
43 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init?rev=1.2&content-type=text/plain
44 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init?r1=1.1&r2=1.2
45
46 Index: ekey-ulusbd.init
47 ===================================================================
48 RCS file: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init,v
49 retrieving revision 1.1
50 retrieving revision 1.2
51 diff -u -r1.1 -r1.2
52 --- ekey-ulusbd.init 28 Sep 2009 18:29:36 -0000 1.1
53 +++ ekey-ulusbd.init 29 Sep 2009 12:03:21 -0000 1.2
54 @@ -1,7 +1,7 @@
55 #!/sbin/runscript
56 # Copyright 2009 Gentoo Foundation
57 # Distributed under the terms of the GNU General Public License v2
58 -# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init,v 1.1 2009/09/28 18:29:36 flameeyes Exp $
59 +# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init,v 1.2 2009/09/29 12:03:21 flameeyes Exp $
60
61 INSTANCE="${SVCNAME#*.}"
62 if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "ekey-ulusbd" ]; then
63 @@ -14,14 +14,13 @@
64
65 start() {
66 if [ -z ${USB_BUS} ]; then
67 - local devdir=$(fgrep -l 20df /sys/bus/usb/devices/*/idVendor \
68 - | xargs -n1 dirname \
69 - | xargs -I{} fgrep -l 0001 {}/idProduct \
70 - | xargs -n1 dirname \
71 - | xargs -I{} fgrep -l ${EKEY_SERIAL} {}/serial \
72 - | xargs -n1 dirname)
73 - USB_BUS=$(< ${devdir}/busnum)
74 - USB_DEV=$(< ${devdir}/devnum)
75 + set -- $(lsusb -v -d 20df:0001 | \
76 + egrep '(^Bus|iSerial)' | \
77 + grep -B1 "${EKEY_SERIAL}" | \
78 + head -n 1 | \
79 + cut -c 5-7,15-18)
80 + USB_BUS=$1
81 + USB_DEV=$2
82 fi
83
84 ebegin "Starting EntropyKey Userland USB Daemon"