summaryrefslogtreecommitdiff
path: root/system/corosync/doinst.sh
diff options
context:
space:
mode:
authorZordrak <slackbuilds@tpa.me.uk>2010-04-18 01:04:41 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-15 10:38:20 +0200
commit8e699975b529cbd9757bf9f2eaae58046cd988a1 (patch)
tree38f1d0b6543448973259e8afc19b334e32e57c97 /system/corosync/doinst.sh
parent947cf099946d354113b4837c08abcc167bc8a369 (diff)
downloadslackbuilds-8e699975b529cbd9757bf9f2eaae58046cd988a1.tar.gz
system/corosync: Added (plug-in for 3rd party cluster services)
Diffstat (limited to 'system/corosync/doinst.sh')
-rw-r--r--system/corosync/doinst.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/system/corosync/doinst.sh b/system/corosync/doinst.sh
new file mode 100644
index 0000000000..7fcbab704f
--- /dev/null
+++ b/system/corosync/doinst.sh
@@ -0,0 +1,17 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+if [ -e etc/rc.d/rc.corosync ]; then
+ cp -a etc/rc.d/rc.corosync etc/rc.d/rc.corosync.new.incoming
+ cat etc/rc.d/rc.corosync.new > etc/rc.d/rc.corosync.new.incoming
+ mv etc/rc.d/rc.corosync.new.incoming etc/rc.d/rc.corosync.new
+fi
+
+config etc/rc.d/rc.corosync.new