baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
- From: Lee Forrest <lforrestster AT gmail.com>
- To: baslinux AT lists.ibiblio.org
- Subject: [BL] Busybox & Psuedo-Random Number Generation
- Date: Thu, 28 Dec 2006 19:27:55 -0800
Can I call halt like so:
/bin/busybox/halt
??
Thanks.
---------------------------
To get David's (statically-compiled against uclibc) msmtp
(SSL/TLS) working I have to set up psuedo-random number
capability, which means creating /dev/random/ and /dev/urandom
and initializing them/it at startup and saving random seed at
shutdown.
mknod urandom c 1 9
mknod random c 1 8
(not sure I really need /dev/random, but...)
I've put this in my /etc/rc, right under the top group:
echo "initializing random number generator..."
if [ -f /var/lib/urandom/random-seed ]
then
cat /var/lib/urandom/random-seed >/dev/urandom
fi
rm -f /var/lib/urandom/random-seed
umask 077
dd if=/dev/urandom of=/var/lib/urandom/random-seed count=1 \
>/dev/null 2>&1 || echo "urandom start: failed."
umask 022
Now I need to figure out how to run this at halt/reboot:
echo -n "Saving random seed..."
umask 077
dd if=/dev/urandom of=/var/lib/urandom/random-seed count=1 \
>/dev/null 2>&1 || echo "urandom stop: failed."
If anyone has any ideas, I'd love to hear them.
/var/lib/urandom/random-seed exists on BL right now, but I'm not
sure where it came from. Maybe fetchmail, which also uses SSL
(but not TLS, I don't think). /usr/bin/file says it has data in
it.
Don't see how it could exist there, because those device files
weren't in BL until I created them. Maybe from the original
install (??)
Thanks,
lee
--
BasicLinux: Small is Beautiful
http://www.basiclinux.com.ru
-
[BL] Busybox & Psuedo-Random Number Generation,
Lee Forrest, 12/28/2006
-
Re: [BL] Busybox & Psuedo-Random Number Generation,
David Moberg, 12/29/2006
- Re: [BL] Busybox & Psuedo-Random Number Generation, Lee Forrest, 12/29/2006
-
Re: [BL] Busybox & Psuedo-Random Number Generation,
sindi keesan, 12/29/2006
- Re: [BL] Busybox & Psuedo-Random Number Generation, Lee Forrest, 12/29/2006
-
Re: [BL] Busybox & Psuedo-Random Number Generation,
David Moberg, 12/29/2006
Archive powered by MHonArc 2.6.24.