aboutsummaryrefslogtreecommitdiff
path: root/system/hddtemp/doinst.sh
diff options
context:
space:
mode:
authorZordrak <slackbuilds@tpa.me.uk>2010-05-12 23:33:37 +0200
committerHeinz Wiesinger <pprkut@slackbuilds.org>2010-05-12 23:33:37 +0200
commitd2add534d477c5dfd6f37bb1f477b94b1562a15d (patch)
tree705040a6553afb44764a231f0cabc9b843cc1665 /system/hddtemp/doinst.sh
parent4db878070ac8636be9cad28bdeae6ecf168ff662 (diff)
system/hddtemp: Added to 12.2 repository
Diffstat (limited to 'system/hddtemp/doinst.sh')
-rw-r--r--system/hddtemp/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/system/hddtemp/doinst.sh b/system/hddtemp/doinst.sh
new file mode 100644
index 0000000000000..7f616013b7608
--- /dev/null
+++ b/system/hddtemp/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...
+}
+
+config etc/hddtemp/hddtemp.db.new
+