aboutsummaryrefslogtreecommitdiff
path: root/system/hibernate-script/doinst.sh
diff options
context:
space:
mode:
authorSergey Portnov <sergius256@narod.ru>2010-05-11 22:55:19 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 22:55:19 +0200
commit9690d1dba9d24ec29728d5473da4d2b69af4a17e (patch)
treebac0aaf6dcc56dcd3e57552a6a481c35abcd3a27 /system/hibernate-script/doinst.sh
parent9bd9e2003182c9a30bf3783edce435399ee53111 (diff)
system/hibernate-script: Added to 12.1 repository
Diffstat (limited to 'system/hibernate-script/doinst.sh')
-rw-r--r--system/hibernate-script/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/hibernate-script/doinst.sh b/system/hibernate-script/doinst.sh
new file mode 100644
index 0000000000..3dbea0c53b
--- /dev/null
+++ b/system/hibernate-script/doinst.sh
@@ -0,0 +1,14 @@
+#!/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...
+}
+