summaryrefslogtreecommitdiffstats
path: root/system/apache-cassandra/doinst.sh
diff options
context:
space:
mode:
author dsomero <xgizzmo@slackbuilds.org>2011-04-04 21:45:45 -0400
committer Robby Workman <rworkman@slackbuilds.org>2011-04-04 22:06:49 -0500
commit50195a5d978996fdfb9bb49590d9233e6fad20ac (patch)
treef344a6a05d6fbc9416c199eed27038683f5a4fc5 /system/apache-cassandra/doinst.sh
parentcc1c5cf5100e7ed5d15d3bf19d6884509ecaee74 (diff)
downloadslackbuilds-50195a5d978996fdfb9bb49590d9233e6fad20ac.tar.gz
slackbuilds-50195a5d978996fdfb9bb49590d9233e6fad20ac.tar.xz
system/apache-cassandra: Updated for version 0.6.12.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to '')
-rw-r--r--system/apache-cassandra/doinst.sh37
1 files changed, 13 insertions, 24 deletions
diff --git a/system/apache-cassandra/doinst.sh b/system/apache-cassandra/doinst.sh
index c7632ed9b2..06483c5804 100644
--- a/system/apache-cassandra/doinst.sh
+++ b/system/apache-cassandra/doinst.sh
@@ -11,29 +11,18 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-# Keep same perms on rc.cassandra.new:
-if [ -e etc/rc.d/rc.cassandra ]; then
- cp -a etc/rc.d/rc.cassandra etc/rc.d/rc.cassandra.new.incoming
- cat etc/rc.d/rc.cassandra.new > etc/rc.d/rc.cassandra.new.incoming
- mv etc/rc.d/rc.cassandra.new.incoming etc/rc.d/rc.cassandra.new
-fi
-
-config etc/rc.d/rc.cassandra.new
-
-# Keep same perms on storage-conf.xml.new:
-if [ -e etc/apache-cassandra/storage-conf.xml ]; then
- cp -a etc/apache-cassandra/storage-conf.xml etc/apache-cassandra/storage-conf.xml.new.incoming
- cat etc/apache-cassandra/storage-conf.xml.new > etc/apache-cassandra/storage-conf.xml.new.incoming
- mv etc/apache-cassandra/storage-conf.xml.new.incoming etc/apache-cassandra/storage-conf.xml.new
-fi
-
-config etc/apache-cassandra/storage-conf.xml.new
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
-# Keep same perms on cassandra.in.sh.new:
-if [ -e etc/apache-cassandra/cassandra.in.sh ]; then
- cp -a etc/apache-cassandra/cassandra.in.sh etc/apache-cassandra/cassandra.in.sh.new.incoming
- cat etc/apache-cassandra/cassandra.in.sh.new > etc/apache-cassandra/cassandra.in.sh.new.incoming
- mv etc/apache-cassandra/cassandra.in.sh.new.incoming etc/apache-cassandra/cassandra.in.sh.new
-fi
+preserve_perms etc/rc.d/rc.cassandra.new
+preserve_perms etc/apache-cassandra/storage-conf.xml.new
+preserve_perms etc/apache-cassandra/cassandra.in.sh.new
-config etc/apache-cassandra/cassandra.in.sh.new \ No newline at end of file