summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2009-09-29 12:03:21 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2009-09-29 12:03:21 +0000
commitbcd4f1687976da18343f6c66e971c555971fe342 (patch)
tree8a71ba0acd216604b6f7ebf456872b0c4ce6525f /app-crypt/ekeyd/files
parentamd64/x86 stable, bug #279386 (diff)
downloadgentoo-2-bcd4f1687976da18343f6c66e971c555971fe342.tar.gz
gentoo-2-bcd4f1687976da18343f6c66e971c555971fe342.tar.bz2
gentoo-2-bcd4f1687976da18343f6c66e971c555971fe342.zip
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.
(Portage version: 2.2_rc42/cvs/Linux x86_64)
Diffstat (limited to 'app-crypt/ekeyd/files')
-rw-r--r--app-crypt/ekeyd/files/ekey-ulusbd.conf4
-rw-r--r--app-crypt/ekeyd/files/ekey-ulusbd.init17
2 files changed, 10 insertions, 11 deletions
diff --git a/app-crypt/ekeyd/files/ekey-ulusbd.conf b/app-crypt/ekeyd/files/ekey-ulusbd.conf
index 80bf0c1aec13..1a6100854df8 100644
--- a/app-crypt/ekeyd/files/ekey-ulusbd.conf
+++ b/app-crypt/ekeyd/files/ekey-ulusbd.conf
@@ -1,6 +1,6 @@
# Copyright 2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf,v 1.1 2009/09/28 18:29:36 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.conf,v 1.2 2009/09/29 12:03:21 flameeyes Exp $
# The userland USB daemon has to know the USB path of the EntopyKey to
# work properly; in alternative to providing these statically, they
@@ -13,4 +13,4 @@ EKEY_SERIAL=""
#USB_BUS=""
#USB_DEV=""
-SOCKET_PATH="/var/run/ekey.ulusbd.${EKEY_SERIAL}"
+SOCKET_PATH="/var/run/ekey-ulusbd-${EKEY_SERIAL}"
diff --git a/app-crypt/ekeyd/files/ekey-ulusbd.init b/app-crypt/ekeyd/files/ekey-ulusbd.init
index f1ee32bcc54a..8a955c5ecec5 100644
--- a/app-crypt/ekeyd/files/ekey-ulusbd.init
+++ b/app-crypt/ekeyd/files/ekey-ulusbd.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init,v 1.1 2009/09/28 18:29:36 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekey-ulusbd.init,v 1.2 2009/09/29 12:03:21 flameeyes Exp $
INSTANCE="${SVCNAME#*.}"
if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "ekey-ulusbd" ]; then
@@ -14,14 +14,13 @@ depend() {
start() {
if [ -z ${USB_BUS} ]; then
- local devdir=$(fgrep -l 20df /sys/bus/usb/devices/*/idVendor \
- | xargs -n1 dirname \
- | xargs -I{} fgrep -l 0001 {}/idProduct \
- | xargs -n1 dirname \
- | xargs -I{} fgrep -l ${EKEY_SERIAL} {}/serial \
- | xargs -n1 dirname)
- USB_BUS=$(< ${devdir}/busnum)
- USB_DEV=$(< ${devdir}/devnum)
+ set -- $(lsusb -v -d 20df:0001 | \
+ egrep '(^Bus|iSerial)' | \
+ grep -B1 "${EKEY_SERIAL}" | \
+ head -n 1 | \
+ cut -c 5-7,15-18)
+ USB_BUS=$1
+ USB_DEV=$2
fi
ebegin "Starting EntropyKey Userland USB Daemon"