aboutsummaryrefslogtreecommitdiff
path: root/system/bit-babbler
diff options
context:
space:
mode:
authorawg <awg@cock.li>2019-03-17 07:59:51 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2019-03-17 07:59:51 +0700
commitdb745e69d421411445a287c8684e0ec94d71a15b (patch)
tree2157c1cd5252ee2f239f431f9c205aac60c7f31e /system/bit-babbler
parentdaa1e41d735b8152258cb80b6e4830381bb339cf (diff)
system/bit-babbler: Update script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/bit-babbler')
-rw-r--r--system/bit-babbler/README2
-rw-r--r--system/bit-babbler/README.Slackware11
-rw-r--r--system/bit-babbler/bit-babbler.SlackBuild12
-rw-r--r--system/bit-babbler/doinst.sh1
-rw-r--r--system/bit-babbler/rc.seedd.new2
5 files changed, 14 insertions, 14 deletions
diff --git a/system/bit-babbler/README b/system/bit-babbler/README
index 83b01b51b0c0..a6bee17d0017 100644
--- a/system/bit-babbler/README
+++ b/system/bit-babbler/README
@@ -6,6 +6,6 @@ Socket control of BitBabbler devices is granted to group bit-babbler
by default. You can create it after installation like so:
groupadd bit-babbler
OR choose another suitable group (eg, wheel) when building:
- GROUP="wheel" sh bit-babbler.SlackBuild
+ BBGROUP="wheel" sh bit-babbler.SlackBuild
Please see README.Slackware for additional installation tips.
diff --git a/system/bit-babbler/README.Slackware b/system/bit-babbler/README.Slackware
index a1b05b91eb7c..2e69cb7eafaa 100644
--- a/system/bit-babbler/README.Slackware
+++ b/system/bit-babbler/README.Slackware
@@ -1,5 +1,5 @@
-To have have BitBabbler device(s) begin feeding entropy to the kernel
-at boot, add these lines to /etc/rc.d/rc.local:
+To have BitBabbler device(s) begin feeding entropy to the kernel at
+boot, add these lines to /etc/rc.d/rc.local:
# Start BitBabbler TRNG.
if [ -x /etc/rc.d/rc.seedd ]; then
@@ -14,8 +14,8 @@ on reboot/shutdown, so add these lines to /etc/rc.d/rc.local_shutdown:
. /etc/rc.d/rc.seedd stop
fi
-Additional changes to the operating configuration of BitBabbler
-devices on boot can be set in /etc/bit-babbler/seedd.conf.
+Additional configuration of BitBabbler devices on boot can be set
+in /etc/bit-babbler/seedd.conf.
Finally, ensure relevant files are executable:
chmod 755 /etc/rc.d/rc.local \
@@ -25,5 +25,4 @@ Finally, ensure relevant files are executable:
N.B. If changes to the udev rules are needed,
cp /lib/udev/rules.d/90-bit-babbler.rules /etc/udev/rules.d
and modify the copy in /etc/udev/rules.d. eudev will only use the
-copy in /etc/udev/rules.d if the filenames are the same.
-
+copy in /etc/udev/rules.d so long as the filenames are the same.
diff --git a/system/bit-babbler/bit-babbler.SlackBuild b/system/bit-babbler/bit-babbler.SlackBuild
index 6f8f806e28d3..c8344c1afb7f 100644
--- a/system/bit-babbler/bit-babbler.SlackBuild
+++ b/system/bit-babbler/bit-babbler.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# SlackBuild for bit-babbler, 6 March 2019
+# SlackBuild for bit-babbler, 7 March 2019
# awg <awg@cock.li>
# All rights reserved.
#
@@ -97,11 +97,11 @@ install -D -m 0644 debian/bit-babbler-sysctl.conf $PKG/etc/sysctl.d/bit-babbler-
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
# set default socket control group in udev rules and seedd.conf for finished package.
-if [ "${GROUP:=bit-babbler}" ]; then
- sed -i -e "s/^\(GROUP=\"\)bit-babbler\(\"\)/\1$GROUP\2/" \
- -e "s/\(-m g:\)bit-babbler\(:rw\)/\1$GROUP\2/" $PKG/lib/udev/rules.d/90-bit-babbler.rules
- sed -i -e "s/^\([[:blank:]]*socket-group[[:blank:]]*\)adm/\1$GROUP/" $PKG/etc/bit-babbler/seedd.conf
- # group adm not a good default.
+if [ "${BBGROUP:=bit-babbler}" ]; then
+ sed -i -e "s/^\(GROUP=\"\)bit-babbler\(\"\)/\1$BBGROUP\2/" \
+ -e "s/\(-m g:\)bit-babbler\(:rw\)/\1$BBGROUP\2/" $PKG/lib/udev/rules.d/90-bit-babbler.rules
+ mv $PKG/etc/bit-babbler/seedd.conf $PKG/etc/bit-babbler/seedd.conf.new
+ sed -i -e "s/^\([[:blank:]]*socket-group[[:blank:]]*\)adm/\1$BBGROUP/" $PKG/etc/bit-babbler/seedd.conf.new
fi
# remove trash.
diff --git a/system/bit-babbler/doinst.sh b/system/bit-babbler/doinst.sh
index ec1e814a599c..8bee7a6f356f 100644
--- a/system/bit-babbler/doinst.sh
+++ b/system/bit-babbler/doinst.sh
@@ -23,3 +23,4 @@ preserve_perms() {
}
preserve_perms etc/rc.d/rc.seedd.new
+preserve_perms etc/bit-babbler/seedd.conf.new
diff --git a/system/bit-babbler/rc.seedd.new b/system/bit-babbler/rc.seedd.new
index 6d0df20bc47f..0843b8c2144e 100644
--- a/system/bit-babbler/rc.seedd.new
+++ b/system/bit-babbler/rc.seedd.new
@@ -20,7 +20,7 @@ seedd_start() {
seedd_stop() {
echo 'Stopping seedd...'
killall -w seedd
- # daemon doesn't clean unused socket lock.
+ # daemon doesn't clean up lock on termination.
rm -f $BBSOCKET.lock
}