summaryrefslogtreecommitdiff
blob: a3f372cc8444d09001be928ac04631404e7d6fdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/sbin/runscript
# Copyright 1999-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.2,v 1.1 2011/10/20 11:40:27 flameeyes Exp $

INSTANCE="${SVCNAME#*.}"
if [ -z "${INSTANCE}" -o "${SVCNAME}" = "ekeyd" ]; then
	INSTANCE="ekeyd"
fi

description="EntropyKey daemon"

pidfile=/var/run/$SVCNAME.pid
cfgfile=/etc/entropykey/${INSTANCE}.conf

command=/usr/libexec/ekeyd
command_args="-f ${cfgfile} -p ${pidfile}"

depend() {
	 config $cfgfile

	 use udev ekey-ulusbd
	 need localmount

	 # 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
}