summaryrefslogtreecommitdiff
path: root/system/cpufreqd/doinst.sh
diff options
context:
space:
mode:
authorRobby Workman <rw@rlworkman.net>2010-05-11 15:18:35 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 15:18:35 +0200
commitf77a02c7afbff16774c0fc6301b9db34ebd1070a (patch)
tree444fd8e1bf2efb41b5db71c83e7ebfe529bb446e /system/cpufreqd/doinst.sh
parentaf96e3345ba7d84df21052f349c5991482a43cc5 (diff)
downloadslackbuilds-f77a02c7afbff16774c0fc6301b9db34ebd1070a.tar.gz
system/cpufreqd: Initial import
Diffstat (limited to 'system/cpufreqd/doinst.sh')
-rw-r--r--system/cpufreqd/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/system/cpufreqd/doinst.sh b/system/cpufreqd/doinst.sh
new file mode 100644
index 0000000000..3c57d2f70c
--- /dev/null
+++ b/system/cpufreqd/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/cpufreqd.conf.new
+