void-packages/templates/initscripts/files/rc.d/random_seed

23 lines
374 B
Bash
Executable File

#!/bin/sh
#
# PROVIDE: random_seed
# REQUIRE: SERVERS sysclock
$_rc_subr_loaded . /etc/rc.subr
name="random_seed"
start_cmd="rseed_start"
stop_cmd=":"
rseed_start()
{
if [ -f /var/run/random-seed ]; then
echo -n "=> Initializing random seed... "
cat /var/run/random-seed >/dev/urandom
show_rval
fi
}
load_rc_config $name
run_rc_command "$1"