diff options
Diffstat (limited to 'sys-apps/rng-tools/files')
-rw-r--r-- | sys-apps/rng-tools/files/rngd | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/sys-apps/rng-tools/files/rngd b/sys-apps/rng-tools/files/rngd index 80f24047eaf3..58d15d9db98c 100644 --- a/sys-apps/rng-tools/files/rngd +++ b/sys-apps/rng-tools/files/rngd @@ -1,33 +1,32 @@ #!/sbin/runscript -# Copyright 1999-2002 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/sys-apps/rng-tools/files/rngd,v 1.2 2003/10/05 17:09:28 hanno Exp $ +# Copyright 1999-2004 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/rng-tools/files/rngd,v 1.3 2004/03/06 04:09:07 vapier Exp $ depend() { need localmount - after random + after random } start() { - ebegin "Starting hardware RNG daemon" - if [ -e /dev/hw_random ]; then - start-stop-daemon --start --quiet --exec /usr/sbin/rngd -- -b -r /dev/hw_random - eend $? "Failed to start hardware RNG daemon" - elif [ -e /dev/hwrandom ]; then - start-stop-daemon --start --quiet --exec /usr/sbin/rngd -- -b -r /dev/hwrandom - eend $? "Failed to start hardware RNG daemon" - elif [ -e /dev/i810_rng ]; then - start-stop-daemon --start --quiet --exec /usr/sbin/rngd -- -b -r /dev/i810_rng - eend $? "Failed to start hardware RNG daemon" - else - eerror "No hardware RNG found!" - return 1 - fi + ebegin "Starting hardware RNG daemon" + if [ -e /dev/hw_random ]; then + start-stop-daemon --start --quiet --exec /usr/sbin/rngd -- -b -r /dev/hw_random + eend $? "Failed to start hardware RNG daemon" + elif [ -e /dev/hwrandom ]; then + start-stop-daemon --start --quiet --exec /usr/sbin/rngd -- -b -r /dev/hwrandom + eend $? "Failed to start hardware RNG daemon" + elif [ -e /dev/i810_rng ]; then + start-stop-daemon --start --quiet --exec /usr/sbin/rngd -- -b -r /dev/i810_rng + eend $? "Failed to start hardware RNG daemon" + else + eerror "No hardware RNG found!" + return 1 + fi } - + stop() { - ebegin "Stopping hardware RNG daemon" - start-stop-daemon --stop --quiet --exec /usr/sbin/rngd - eend $? "Failed to stop hardware RNG daemon" + ebegin "Stopping hardware RNG daemon" + start-stop-daemon --stop --quiet --exec /usr/sbin/rngd + eend $? "Failed to stop hardware RNG daemon" } - |