Package: rng-tools Version: 2-unofficial-mt.13-3 Severity: important Tags: patch
Hello,
the rng-tools init-script should depend on the start of the sysfsutils
init-script:
Under some circumstances users have to configure which of the available
Hardware RNGs has to be used as "current" RNG for /dev/hwrng before
rngd can start successfully (see below for a full example). This can be
done by setting /sys/devices/virtual/misc/hw_random/rng_current, and
this, in turn, is done by sysfsutils.
Adding
# Should-Start: sysfsconf
to the rng-tools init-scripts LSB headers should suffice for
dependency-based boot.
I'm not sure if it's worth the effort to completely fix this for legacy
boot as well. The easy part on this is to raise the sequence number from
20 to 21 or higher (because sysfsutils runs at sequence 20 as well and
alpabetically orders after rng-tools :)). But a complete fix would also
require to remove/re-install the rc*.d symlinks as well, which is not
done automatically by update-rc.d.
Patch attached. The patch adds the LSB header and increases the legacy
sequence number, but does not re-install the rc*.d symlinks.
Here is the full example if you care :)
I have an IdeaPad S12 VIA Nano where two Hardware RNGs are provided: one
by VIA PadLock through via-rng, and one by the Broadcom Wireless card
through b43. The Broadcom RNG is only delivering data if the wireless
interface is up and otherwise responds ENODEV on read().
Unfortunately, the b43 driver gets loaded earlier than the via-rng
driver (the former via udev, the latter via /etc/modules) and thus, by
default the Broadcom RNG is selected as "current" RNG for /dev/hwrng.
Unfortunately further, the wirless interface is still down when
rng-tools is about to be started and thus rngd fails to start (the
interface is brought up by network-manager which starts later than
rng-tools).
Thus, I need to set the VIA PadLock RNG as "current" RNG first before
rngd can start successfully.
regards
Mario
--
There are 10 types of people in the world:
Those who understand binary, and those who don't...
diff -urN rng-tools-2-unofficial-mt.13.orig/debian/rng-tools.init rng-tools-2-unofficial-mt.13/debian/rng-tools.init --- rng-tools-2-unofficial-mt.13.orig/debian/rng-tools.init 2010-05-14 04:25:01.000000000 +0200 +++ rng-tools-2-unofficial-mt.13/debian/rng-tools.init 2010-07-24 07:35:51.001650441 +0200 @@ -7,6 +7,7 @@ ### BEGIN INIT INFO # Provides: rng-tools # Required-Start: $remote_fs $syslog +# Should-Start: sysfsconf # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 diff -urN rng-tools-2-unofficial-mt.13.orig/debian/rules rng-tools-2-unofficial-mt.13/debian/rules --- rng-tools-2-unofficial-mt.13.orig/debian/rules 2010-05-14 04:25:01.000000000 +0200 +++ rng-tools-2-unofficial-mt.13/debian/rules 2010-07-24 07:43:33.600830910 +0200 @@ -107,7 +107,7 @@ # dh_installpam # dh_installmime dh_installmodules - dh_installinit --error-handler=true + dh_installinit --error-handler=true --update-rcd-params="defaults 21 19" # dh_installcron dh_installman # dh_installinfo
signature.asc
Description: Digital signature

