From d2add534d477c5dfd6f37bb1f477b94b1562a15d Mon Sep 17 00:00:00 2001 From: Zordrak Date: Wed, 12 May 2010 23:33:37 +0200 Subject: system/hddtemp: Added to 12.2 repository --- system/hddtemp/doinst.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 system/hddtemp/doinst.sh (limited to 'system/hddtemp/doinst.sh') diff --git a/system/hddtemp/doinst.sh b/system/hddtemp/doinst.sh new file mode 100644 index 000000000000..7f616013b760 --- /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 + -- cgit v1.2.3