tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: rc.d/rndctl
On Wed, 17 Sep 2008, Thor Lancelot Simon wrote:
On Wed, Sep 17, 2008 at 03:58:51PM -0400, Brian A. Seklecki wrote:
All:
I was about to assemble a PR to submit an etc/rc.d/rndctl to enable
various default sources at run time. I wanted to get some community
feedback on what are sound default RNG sources (net, disk, rng, etc.)
There *are* defaults, they're built into the kernel. They used to be
sane -- have they been changed so that they no longer are?
1a) On my -rnetbsd-4, on various embedded platforms with md(4)/rd(4) file
system (zero disk I/O), and a serial console (zero TTY), I find that I
have to enable net, *unless* it's a AMD Geode or Soekris with glxsb(4)
1b) Are the default sane? Probably on workstation and servers, but I've
found that it would be nice to have an rc(8)-level control for
embedded environments.
2) I find that rndctl(8) does not accept multiple arguments for "-t", or
rather, it does, but fails silently to iterate operations against an
input list, so here's an improved RC:
-- defaults/rc.conf --
rndctl=YES # Random number generator
rndctl_flags="disk net rng tty"
-- rc --
#!/bin/sh
#
# $NetBSD$
#
# PROVIDE: rndctl
# BEFORE: ike ipsec sshd
$_rc_subr_loaded . /etc/rc.subr
name="rndctl"
rcvar=$name
command="/sbin/${name}"
start_cmd=rndctl_start
rndctl_start()
{
for dev in $rc_flags; do
$command -c -e -t $dev;
done
}
load_rc_config $name
run_rc_command "$1"
Home |
Main Index |
Thread Index |
Old Index