aboutsummaryrefslogtreecommitdiff
path: root/system/clusterresourceagents/doinst.sh
diff options
context:
space:
mode:
authorZordrak <slackbuilds@tpa.me.uk>2010-04-18 01:04:03 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-15 10:38:20 +0200
commit947cf099946d354113b4837c08abcc167bc8a369 (patch)
tree16e2d5db990dbb65b2938dad2f38266b0e5211c1 /system/clusterresourceagents/doinst.sh
parent906ac354a1bcf4d0fde922341410d042084497ae (diff)
system/clusterresourceagents: Added (Resource Agents for HA-Linux)
Diffstat (limited to 'system/clusterresourceagents/doinst.sh')
-rw-r--r--system/clusterresourceagents/doinst.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/system/clusterresourceagents/doinst.sh b/system/clusterresourceagents/doinst.sh
new file mode 100644
index 000000000000..5945851bbf35
--- /dev/null
+++ b/system/clusterresourceagents/doinst.sh
@@ -0,0 +1,32 @@
+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.ldirectord ]; then
+ cp -a etc/rc.d/rc.ldirectord etc/rc.d/rc.ldirectord.new.incoming
+ cat etc/rc.d/rc.ldirectord.new > etc/rc.d/rc.ldirectord.new.incoming
+ mv etc/rc.d/rc.ldirectord.new.incoming etc/rc.d/rc.ldirectord.new
+fi
+
+if [ -e etc/logrotate.d/ldirectord ]; then
+ cp -a etc/logrotate.d/ldirectord etc/logrotate.d/ldirectord.new.incoming
+ cat etc/logrotate.d/ldirectord.new > etc/logrotate.d/ldirectord.new.incoming
+ mv etc/logrotate.d/ldirectord.new.incoming etc/logrotate.d/ldirectord.new
+fi
+
+if [ -e etc/ha.d/shellfuncs ]; then
+ cp -a etc/ha.d/shellfuncs etc/ha.d/shellfuncs.new.incoming
+ cat etc/ha.d/shellfuncs.new > etc/ha.d/shellfuncs.new.incoming
+ mv etc/ha.d/shellfuncs.new.incoming etc/ha.d/shellfuncs.new
+fi
+
+config etc/rc.d/rc.ldirectord.new
+config etc/logrotate.d/ldirectord.new
+config etc/ha.d/shellfuncs.new
+