diff options
author | Aaditya Bagga <aaditya_gnulinux@zoho.com> | 2014-09-22 10:03:04 -0500 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-09-27 08:48:09 +0700 |
commit | f35358cbe710b3b0fb226a1d168fd7386a5a6e99 (patch) | |
tree | 113c4dc7a5e583222bd790c1ba170e2fe9b57f4c /system/xfsudo/doinst.sh | |
parent | 4333af2aea9ffcddead587cd796bd5f73d789516 (diff) |
system/xfsudo: Updated for vesion 0.5.
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'system/xfsudo/doinst.sh')
-rw-r--r-- | system/xfsudo/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/xfsudo/doinst.sh b/system/xfsudo/doinst.sh new file mode 100644 index 0000000000000..de85fd01cc0aa --- /dev/null +++ b/system/xfsudo/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/xfsudo.conf.new |