summaryrefslogtreecommitdiffstats
path: root/misc/rsnapshot/doinst.sh
diff options
context:
space:
mode:
author Sean Donner <sean.donner@sbcglobal.net>2010-05-11 20:01:09 +0200
committer Robby Workman <rworkman@slackbuilds.org>2010-05-11 20:01:09 +0200
commit988861d8dca420f5c8b1663721869b99f04eacf8 (patch)
tree70b134924d7d5f46fd169f4393430d5e9d9a4ae9 /misc/rsnapshot/doinst.sh
parentc25ac953ad4870cd2ac187ce1e5ff8e4083d3c33 (diff)
downloadslackbuilds-988861d8dca420f5c8b1663721869b99f04eacf8.tar.gz
slackbuilds-988861d8dca420f5c8b1663721869b99f04eacf8.tar.xz
misc/rsnapshot: Added to 12.0 repository
Diffstat (limited to 'misc/rsnapshot/doinst.sh')
-rw-r--r--misc/rsnapshot/doinst.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/misc/rsnapshot/doinst.sh b/misc/rsnapshot/doinst.sh
new file mode 100644
index 0000000000..eb706ba01d
--- /dev/null
+++ b/misc/rsnapshot/doinst.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+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/rsnapshot.conf.new
+