summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2008-12-02 11:40:23 +0000
committerMatthias Radestock <matthias@lshift.net>2008-12-02 11:40:23 +0000
commit60b0f6703e409f7629ea48017dade4d1c2d9672a (patch)
tree3a73da000dd483313d6f455381eba30154e219f9 /packaging
parent4029615d25b0b6160eab6a61cd09d2e8e6c98e89 (diff)
parent99f686ef9115605c9bc9c5f19db9f61a8590d880 (diff)
downloadrabbitmq-server-git-60b0f6703e409f7629ea48017dade4d1c2d9672a.tar.gz
merge bug19871 into default
Diffstat (limited to 'packaging')
-rw-r--r--packaging/debs/Debian/debian/control2
-rw-r--r--packaging/debs/Debian/debian/postinst22
-rw-r--r--packaging/debs/Debian/debian/templates16
3 files changed, 39 insertions, 1 deletions
diff --git a/packaging/debs/Debian/debian/control b/packaging/debs/Debian/debian/control
index 749791a4bd..a0d858be6c 100644
--- a/packaging/debs/Debian/debian/control
+++ b/packaging/debs/Debian/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.7.2
Package: rabbitmq-server
Architecture: all
-Depends: erlang-nox, adduser, logrotate
+Depends: erlang-nox, adduser, logrotate, debconf
Description: An AMQP server written in Erlang
RabbitMQ is an implementation of AMQP, the emerging standard for high
performance enterprise messaging. The RabbitMQ server is a robust and
diff --git a/packaging/debs/Debian/debian/postinst b/packaging/debs/Debian/debian/postinst
index f92131d0c8..13d8552f3d 100644
--- a/packaging/debs/Debian/debian/postinst
+++ b/packaging/debs/Debian/debian/postinst
@@ -34,6 +34,28 @@ chown -R rabbitmq:rabbitmq /var/log/rabbitmq
case "$1" in
configure)
+ . /usr/share/debconf/confmodule
+
+ if ! su rabbitmq -s /bin/sh -c /usr/lib/rabbitmq/bin/rabbitmq-mnesia-current ; then
+ db_beginblock
+ db_input high rabbitmq-server/mnesia-dir-note || true
+ db_input high rabbitmq-server/do-what-with-mnesia-dir || true
+ db_endblock
+ db_go
+
+ db_get rabbitmq-server/do-what-with-mnesia-dir
+ if [ "$RET" = "Delete it" ]; then
+ rm -r /var/lib/rabbitmq/mnesia/
+ elif [ "$RET" = "Move it elsewhere" ]; then
+ db_input high rabbitmq-server/move-mnesia-dir-where || true
+ db_go
+
+ db_get rabbitmq-server/move-mnesia-dir-where
+
+ mkdir -p "`dirname $RET`"
+ mv /var/lib/rabbitmq/mnesia "$RET"
+ fi
+ fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
diff --git a/packaging/debs/Debian/debian/templates b/packaging/debs/Debian/debian/templates
new file mode 100644
index 0000000000..89f5754bd7
--- /dev/null
+++ b/packaging/debs/Debian/debian/templates
@@ -0,0 +1,16 @@
+Template: rabbitmq-server/mnesia-dir-note
+Type: note
+Description: Schema changed
+ The RabbitMQ database schema has changed. If your RabbitMQ database contains important data, such as user accounts, durable exchanges and queues, or persistent messages, then we recommend you contact support@rabbitmq.com for assistance with the upgrade. If you want to experiment with the new version in the meantime, simply move the database directory to a safe place. In all other cases just remove the directory.
+
+
+Template: rabbitmq-server/do-what-with-mnesia-dir
+Type: select
+Choices: Delete it, Move it elsewhere, Keep it in place (WILL BREAK)
+Default: Delete it
+Description: What do you want to do with the RabbitMQ database directory?
+
+Template: rabbitmq-server/move-mnesia-dir-where
+Type: string
+Default: /var/lib/rabbitmq/mnesia-old/
+Description: Where do you want to move the RabbitMQ database directory?