system/bit-babbler: Use /lib/udev.

Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
This commit is contained in:
Arthur W. Green 2016-12-11 00:01:04 +00:00 committed by Willy Sudiarto Raharjo
parent f7ea71c4f5
commit a5e0283c5e
No known key found for this signature in database
GPG key ID: 887B8374D7333381
2 changed files with 18 additions and 16 deletions

View file

@ -1,31 +1,33 @@
The BitBabbler is a hardware True Random Number Generator (TRNG)
manufactured by Voicetronix of Australia. This package installs the
software necessary to control and perform basic health checks on both
"white" or "black" varieties of BB devices. After installing this
package:
White and Black BB devices.
1. Add group "bit-babbler", or modify
/etc/udev/rules.d/90-bit-babbler.rules to use an existing group (e.g.,
"wheel" or "adm"). Beside root, only members of this designated group
will be able to directly access BB devices on your system.
After installing this package, you'll need to addgroup "bit-babbler"
OR: put a modified copy of
/lib/udev/rules.d/90-bit-babbler.rules
into /etc/udev/rules.d that uses an existing group (e.g., "wheel").
(So long as the filename is the same, the modified rules file in this
directory will override the original installed by this package.)
2a. Typically, you'll probably want your BitBabbler device(s) to start
feeding entropy to the kernel at boot. Include these lines in
/etc/rc.d/rc.local:
To also have your BitBabbler device(s) start feeding entropy to the
kernel at boot:
1) Add the following lines to /etc/rc.d/rc.local:
# Start BitBabbler TRNG.
if [ -x /etc/rc.d/rc.seedd ]; then
. /etc/rc.d/rc.seedd start
fi
2b. It is also a good idea to stop your BB device from feeding entropy
to the kernel before capturing the random number seed on
shutdown/reboot. Put these lines in /etc/rc.d/rc.local_shutdown,
which you'll need to create if it doesn't already exist:
2) And add the following to /etc/rc.d/rc.local_shutdown:
# Stop BitBabbler TRNG.
if [ -x /etc/rc.d/rc.seedd ]; then
. /etc/rc.d/rc.seedd stop
fi
3) Then be sure the execute bit is set (chmod) for rc.local,
rc.local_shutdown, and rc.seedd.
Enjoy!

View file

@ -1,6 +1,6 @@
#!/bin/sh -e
# SlackBuild for BitBabbler TRNG software, 28 November 2016
# SlackBuild for BitBabbler TRNG software, 4 December 2016
# Arthur W. Green <awg@posteo.us>
# All rights reserved.
#
@ -28,7 +28,7 @@
PRGNAM=bit-babbler
VERSION=${VERSION:-0.6}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -99,7 +99,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
# install sysctl setting, udev rules, and init script.
install -D -m 0644 debian/bit-babbler-sysctl.conf $PKG/etc/sysctl.d/bit-babbler-sysctl.conf
install -D -m 0644 debian/bit-babbler.udev $PKG/etc/udev/rules.d/90-bit-babbler.rules
install -D -m 0644 debian/bit-babbler.udev $PKG/lib/udev/rules.d/90-bit-babbler.rules
install -D -m 0644 $CWD/rc.seedd.new $PKG/etc/rc.d/rc.seedd.new
mkdir -p $PKG/install