diff options
author | pyllyukko <pyllyukko AT maimed dot org> | 2017-02-12 15:25:53 +0000 |
---|---|---|
committer | David Spencer <idlemoor@slackbuilds.org> | 2017-02-12 15:25:53 +0000 |
commit | 343a7a78fdaa80affbc22265c4830a41b92887ab (patch) | |
tree | 65f0d0d81c2154a0858048dbd379761a38c67f3b /system/onerng/doinst.sh | |
parent | 2f1761220db12fad6b31fd3420cf5e8c093e661d (diff) | |
download | slackbuilds-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.sh | 14 |
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 |