summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/ekeyd/files/ekeyd.init')
-rw-r--r--app-crypt/ekeyd/files/ekeyd.init13
1 files changed, 11 insertions, 2 deletions
diff --git a/app-crypt/ekeyd/files/ekeyd.init b/app-crypt/ekeyd/files/ekeyd.init
index 528a8d32ab7d..897f3ac77e95 100644
--- a/app-crypt/ekeyd/files/ekeyd.init
+++ b/app-crypt/ekeyd/files/ekeyd.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 2009 Gentoo Foundation
+# Copyright 2009-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init,v 1.3 2009/10/04 11:43:34 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-crypt/ekeyd/files/ekeyd.init,v 1.4 2011/04/08 02:39:27 flameeyes Exp $
INSTANCE="${SVCNAME#*.}"
if [ -z "${INSTANCE}" ] || [ "${SVCNAME}" = "ekeyd" ]; then
@@ -11,6 +11,15 @@ fi
depend() {
use udev ekey-ulusbd
need localmount
+
+ local cfgfile="/etc/entropykey/${INSTANCE}.conf"
+ config "${cfgfile}"
+
+ # quickly parse the configuration file; we only provide entropy
+ # if we're not using the egd server/client split method.
+ if sed -e 's:--.*::' "${cfgfile}" | grep -q SetOutputToKernel; then
+ provide entropy
+ fi
}
start() {