summaryrefslogtreecommitdiff
path: root/system/onerng/doinst.sh
diff options
context:
space:
mode:
authorpyllyukko <pyllyukko AT maimed dot org>2017-02-12 15:25:53 +0000
committerDavid Spencer <idlemoor@slackbuilds.org>2017-02-12 15:25:53 +0000
commit343a7a78fdaa80affbc22265c4830a41b92887ab (patch)
tree65f0d0d81c2154a0858048dbd379761a38c67f3b /system/onerng/doinst.sh
parent2f1761220db12fad6b31fd3420cf5e8c093e661d (diff)
downloadslackbuilds-343a7a78fdaa80affbc22265c4830a41b92887ab.tar.gz
system/onerng: Added (entropy generator).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/onerng/doinst.sh')
-rw-r--r--system/onerng/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/onerng/doinst.sh b/system/onerng/doinst.sh
new file mode 100644
index 0000000000..2fec62be61
--- /dev/null
+++ b/system/onerng/doinst.sh
@@ -0,0 +1,14 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/onerng.conf.new