#!/bin/sh
#
# This script is called by startkde.tru64. It ensures that PRNGD is running
# when KDE is started. PRNGD is an entropy gathering daemon which collects
# random data and provides it on the /tmp/random Unix socket. This is needed
# for https:// connections in konqueror. If you do not need this, or if you
# already have another entropy gathering daemon (like EGD or PRNGD) installed
# on your system, just rename the file /usr/local/kde21/share/config/prngd.conf
# to some other name, and this script won't start the PRNGD daemon. Be sure
# in this case to link your random socket to /tmp/random or to configure
# your personal SSL settings (kcontrol -> Personal settings -> crypto)
# to use another socket.
#
EXE=$KDEDIR/bin/prngd
SOCK=/tmp/random
CFG=$KDEDIR/share/config/prngd.conf
if [ -x $EXE -a -r $CFG ]; then
    n=`/usr/bin/ps ax | /usr/bin/fgrep $EXE | 
                        /usr/bin/fgrep -v fgrep | /usr/bin/wc -l`
    if [ $n -eq 0 ]; then
        $EXE -n -m 0777 -c $CFG $SOCK
        /usr/bin/sleep 3
        /usr/bin/chmod 777 $SOCK
    fi
fi
#
# end of file
