turn on suggestions
![]() Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
|
DETAILED DESCRIPTION <br/>
<br/>
random Script to snapshot random state and reload it at boot time.<br/>
#
. /etc/rc.d/init.d/functions
random_seed=/var/run/random-seed
case "$1" in
start)
Carry a random seed from start-up to start-up<br/>
Load and then save 512 bytes, which is the size of the entropy pool<br/>
if <a class="jive-link-adddocument" href="http://community.brocade.com/home/community-document-picker.jspa?communityID=2006&subject=-f%24random_seed+"> -f $random_seed </a>; then<br/>
cat $random_seed >/dev/urandom<br/>
else<br/>
touch $random_seed<br/>
fi<br/>
action "Initializing random number generator" /bin/true<br/>
chmod 600 $random_seed<br/>
dd if=/dev/urandom of=$random_seed count=1 bs=512 2>/dev/null<br/>
touch /var/lock/subsys/random <br/>
<br/>
;;<br/>
<br/>
stop)<br/>
Carry a random seed from shut-down to start-up<br/>
Save 512 bytes, which is the size of the entropy pool<br/>
touch $random_seed<br/>
chmod 600 $random_seed<br/>
action "Saving random seed" dd if=/dev/urandom of=$random_seed count=1 bs=512 2>/dev/null <br/>
<br/>
rm -f /var/lock/subsys/random<br/>
;;<br/>
status)<br/>
this is way overkill, but at least we have some status output...<br/>
if -c /dev/random ; then
echo "The random data source exists"
else
echo "The random data source is missing"
fi
;;
restart|reload)
do not do anything; this is unreasonable<br/>
:<br/>
;;<br/>
*)<br/>
do not advertise unreasonable commands that there is no reason<br/>
to use with this device<br/>
echo "Usage: random {start|stop|status|restart|reload}"
exit 1
esac
exit 0
REQUIREMENTS
Operating System Linux
Interface Saves and restores system entropy pool for higher quality
Fabric Operating System Not Given
Other Not Given
NOTES (INCLUDING LIMITATIONS)
aves and restores system entropy pool for higher quality \
NOTE: This contribution was migrated by Brocade from the former Brocade Connect community on March 13, 2008, on behalf of the author.