summaryrefslogtreecommitdiff
blob: 62ca56b874d9565b80f64065c2ba618eada62c78 (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
31
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-misc/entropy/files/entropy.rc,v 1.1 2004/05/02 07:09:35 vapier Exp $

depend() {
	need net
	use mysql
}

checkconfig() {
	local HOME="`getent passwd ${ENTROPY_USER} | cut -d: -f 6`"
	if [ ! -d ${HOME} ] ; then
		mkdir -p ${HOME}
		chown ${ENTROPY_USER} ${HOME}
	fi
	cd ${HOME}
}

start() {
	checkconfig || return 1
	ebegin "Starting entropy"
	su - ${ENTROPY_USER} -c entropy
	eend $?
}

stop() {
	ebegin "Stopping entropy"
	entropy --kill
	eend $?
}