#!/bin/sh
########################################################################
# Begin haveged
#
# Description : Start haveged daemon
#
# Author      : Bruce Dubbs - bdubbs@linuxfromscratch.org
#
# Version     : BLFS 7.5
#
########################################################################

### BEGIN INIT INFO
# Provides:            haveged
# Required-Start:      udev 
# Should-Start:        $syslog
# Required-Stop:       
# Should-Stop:         $syslog
# Default-Start:       2 3 4 5
# Default-Stop:        0 1 6
# Short-Description:   haveged daemon
# Description:         Provide increased entropy to /dev/random
# X-LFS-Provided-By:   BLFS
### END INIT INFO

. /lib/lsb/init-functions

#$LastChangedBy: bdubbs $
#$Date: 2012-05-09 15:19:23 -0500 (Wed, 09 May 2012) $

case "$1" in
   start)
      log_info_msg "Starting haveged..."
      start_daemon /usr/sbin/haveged
      evaluate_retval
      ;;

   stop)
      log_info_msg "Stopping haveged..."
      killproc /usr/sbin/haveged
      evaluate_retval
      ;;
 
   status)
      statusproc /usr/sbin/haveged
      ;;

   *)
      echo "Usage: $0 {start|stop|status}"
      exit 1
      ;;
esac

# End haveged

