#! /bin/sh # # audio-entropyd: Starts the Audio Entropy Daemon # # chkconfig: - 98 02 # description: This is a daemon which runs on client machines to generate entropy # from the system soundcard (if present and active). # processname: audio-entropyd # config: /etc/sysconfig/audio-entropyd confdir=/etc/sysconfig # Source function library. . /etc/init.d/functions AED_BIN=/usr/sbin/audio-entropyd test -x $AED_BIN || exit 5 LOCKFILE=/var/lock/subsys/audio-entropyd if [ -r $confdir/audio-entropyd ]; then . $confdir/audio-entropyd fi case "$1" in start) echo -n $"Starting Audio Entropy daemon... " daemon $AED_BIN $OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $LOCKFILE ;; stop) echo -n $"Shutting down Audio Entropy daemon: " killproc $AED_BIN RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $LOCKFILE ;; restart|reload) $0 stop $0 start ;; condrestart) [ -f $LOCKFILE ] && restart || : ;; status) status audio-entropyd RETVAL=$? ;; *) echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}" RETVAL=1 ;; esac exit $RETVAL