try hard to unset HOME and randfile

This commit is contained in:
Love Hornquist Astrand
2010-03-21 16:06:34 -07:00
parent 83e2a17c0f
commit 408e3420d1

View File

@@ -83,16 +83,24 @@ done
# RAND_file_name() when the enviroment is lacking those.
#
HOME=
RANDFILE=
if [ -e /dev/random -o -e /dev/urandom -o -e /dev/srandom -o -e /dev/arandom ] ; then
# try hard to unset HOME and RANDFILE
HOME=
RANDFILE=
unset HOME
unset RANDFILE
${rand} --method=unix --file=unix 2>error
res=$?
if test "X$res" != X0 ; then
grep "random not ready yet" error || \
{ echo "random unix ready failing" ; cat error; exit 1; }
echo "random method unix out for lunch"
continue
fi
${rand} --method=unix --file=unix 2>error
res=$?
if test "X$res" != X0 ; then
grep "random not ready yet" error || \
{ echo "random unix ready failing" ; cat error; exit 1; }
echo "random method unix out for lunch"
continue
fi
exit 0