diff options
author | Giuseppe Di Terlizzi <giuseppe.diterlizzi@gmail.com> | 2021-04-02 11:16:17 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-04-02 11:16:17 +0700 |
commit | 76712d9461bd994b1689088540000a5908ccc47f (patch) | |
tree | 44550dee895cfbf2b2447d164466c61451b7599a /system/softhsm/doinst.sh | |
parent | f7384cf8b9c98c8c43e7570395bde7fb651baa7e (diff) |
system/softhsm: Updated for version 2.6.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/softhsm/doinst.sh')
-rw-r--r-- | system/softhsm/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/softhsm/doinst.sh b/system/softhsm/doinst.sh new file mode 100644 index 0000000000000..a3383ce28e835 --- /dev/null +++ b/system/softhsm/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/softhsm2.conf.new |