diff options
author | Mario Preksavec | 2018-10-06 09:15:01 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo | 2018-10-13 03:03:08 +0200 |
commit | 7149899df2db0b2a8800c23a205bcef72b1b805b (patch) | |
tree | 3916fcdb721c823e3cfc63f25b1d46682355879f /network/oidentd/doinst.sh | |
parent | 04200d1b6651adbecbeeddf76215fdbcdf43ecc0 (diff) | |
download | slackbuilds-7149899df2db0b2a8800c23a205bcef72b1b805b.tar.gz |
network/oidentd: Updated for version 2.3.1.
Signed-off-by: Mario Preksavec <mario@slackware.hr>
Diffstat (limited to 'network/oidentd/doinst.sh')
-rw-r--r-- | network/oidentd/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/network/oidentd/doinst.sh b/network/oidentd/doinst.sh new file mode 100644 index 0000000000..5154cf2bdd --- /dev/null +++ b/network/oidentd/doinst.sh @@ -0,0 +1,15 @@ +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... +} + +for i in etc/oidentd{_masq,}.conf.new ; do config $i ; done + |