summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Radestock <matthias@lshift.net>2008-12-11 19:20:33 +0000
committerMatthias Radestock <matthias@lshift.net>2008-12-11 19:20:33 +0000
commit709e5f70b73618465a7916575cdf1c9195788d1a (patch)
treed31e050b12e1ad9de25841aa5cb0ccb3cb462770
parent4e44a00b8b333ec5eb6d5d464413c7e6c82b7ca5 (diff)
parent9d24a68829131ba34fe1d766bd1fcd36d801b29b (diff)
downloadrabbitmq-server-709e5f70b73618465a7916575cdf1c9195788d1a.tar.gz
merge bug19989 into default
-rw-r--r--packaging/debs/Debian/debian/config25
-rw-r--r--packaging/debs/Debian/debian/postinst21
-rw-r--r--packaging/debs/Debian/debian/templates10
3 files changed, 30 insertions, 26 deletions
diff --git a/packaging/debs/Debian/debian/config b/packaging/debs/Debian/debian/config
new file mode 100644
index 00000000..9020888a
--- /dev/null
+++ b/packaging/debs/Debian/debian/config
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+# Source debconf library.
+. /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" = "Deleted" ]; then
+ rm -r /var/lib/rabbitmq/mnesia/
+ elif [ "$RET" = "Moved" ]; 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
diff --git a/packaging/debs/Debian/debian/postinst b/packaging/debs/Debian/debian/postinst
index 13d8552f..d0575628 100644
--- a/packaging/debs/Debian/debian/postinst
+++ b/packaging/debs/Debian/debian/postinst
@@ -35,27 +35,6 @@ 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
index 89f5754b..da63cae2 100644
--- a/packaging/debs/Debian/debian/templates
+++ b/packaging/debs/Debian/debian/templates
@@ -1,16 +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.
+ 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 it is recommended to 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?
+Choices: Moved, Deleted, Kept (WILL BREAK)
+Default: Moved
+Description: The old RabbitMQ database directory should be:
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?
+Description: Directory where the old RabbitMQ database should be moved: