summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-05-30 17:17:43 -0700
committerSage Weil <sage@inktank.com>2013-05-30 17:17:43 -0700
commita40010534fd2d89eba3991f305089c35f02f2cad (patch)
tree3b950e3113b26caa164d5b7d54057d106d67dcad
parent38ed3e43f52366006b04fe1bed6ebbfaf25f19ca (diff)
parent1d75b49c72105f27258709040647200db07d148b (diff)
downloadceph-a40010534fd2d89eba3991f305089c35f02f2cad.tar.gz
Merge branch 'wip-deb-removal' into next
Tested by Tamil, Gary.
-rw-r--r--debian/ceph-mds.postinst9
-rw-r--r--debian/ceph-mds.prerm20
-rw-r--r--debian/ceph.postinst9
-rw-r--r--debian/ceph.prerm25
-rw-r--r--debian/radosgw.postinst49
-rw-r--r--debian/radosgw.prerm23
6 files changed, 99 insertions, 36 deletions
diff --git a/debian/ceph-mds.postinst b/debian/ceph-mds.postinst
index 316aa7b1040..a22c5169713 100644
--- a/debian/ceph-mds.postinst
+++ b/debian/ceph-mds.postinst
@@ -21,14 +21,7 @@ set -e
case "$1" in
configure)
- invoke-rc.d ceph-mds-all start || {
- RESULT=$?
- # Ignore if ceph-mds-all upstart config does not
- # exist or upstart is not in use
- if [ $RESULT != 100 ]; then
- exit $RESULT
- fi
- }
+ start ceph-mds-all || true
;;
abort-upgrade|abort-remove|abort-deconfigure)
:
diff --git a/debian/ceph-mds.prerm b/debian/ceph-mds.prerm
index e4cd62c985f..3c5f5cf142a 100644
--- a/debian/ceph-mds.prerm
+++ b/debian/ceph-mds.prerm
@@ -3,14 +3,20 @@
set -e
-invoke-rc.d ceph-mds-all stop || {
- RESULT=$?
- # Ignore if ceph-all upstart config does not
- # exist or upstart is not in use
- if [ $RESULT != 100 ]; then
+case "$1" in
+ remove)
+ stop ceph-mds-all || true
+ invoke-rc.d ceph stop mds || {
+ RESULT=$?
+ if [ $RESULT != 100 ]; then
exit $RESULT
- fi
-}
+ fi
+ }
+ ;;
+
+ *)
+ ;;
+esac
#DEBHELPER#
diff --git a/debian/ceph.postinst b/debian/ceph.postinst
index cf760d02c09..98ab9b5ff72 100644
--- a/debian/ceph.postinst
+++ b/debian/ceph.postinst
@@ -28,14 +28,7 @@ set -e
case "$1" in
configure)
rm -f /etc/init/ceph.conf
- invoke-rc.d ceph-all start || {
- RESULT=$?
- # Ignore if ceph-all upstart config does not
- # exist or upstart is not in use
- if [ $RESULT != 100 ]; then
- exit $RESULT
- fi
- }
+ start ceph-all || true
;;
abort-upgrade|abort-remove|abort-deconfigure)
:
diff --git a/debian/ceph.prerm b/debian/ceph.prerm
index ad509223cbc..074ddf62302 100644
--- a/debian/ceph.prerm
+++ b/debian/ceph.prerm
@@ -3,21 +3,20 @@
set -e
-invoke-rc.d ceph-all stop || {
- RESULT=$?
- # Ignore if ceph-all upstart config does not
- # exist or upstart is not in use
- if [ $RESULT != 100 ]; then
+case "$1" in
+ remove)
+ stop ceph-all || true
+ invoke-rc.d ceph stop || {
+ RESULT=$?
+ if [ $RESULT != 100 ]; then
exit $RESULT
- fi
-}
+ fi
+ }
+ ;;
-invoke-rc.d ceph stop || {
- RESULT=$?
- if [ $RESULT != 100 ]; then
- exit $RESULT
- fi
-}
+ *)
+ ;;
+esac
#DEBHELPER#
diff --git a/debian/radosgw.postinst b/debian/radosgw.postinst
new file mode 100644
index 00000000000..afc7dd39a84
--- /dev/null
+++ b/debian/radosgw.postinst
@@ -0,0 +1,49 @@
+#!/bin/sh
+# vim: set noet ts=8:
+# postinst script for radosgw
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#
+# postinst configure <most-recently-configured-version>
+# old-postinst abort-upgrade <new-version>
+# conflictor's-postinst abort-remove in-favour <package> <new-version>
+# postinst abort-remove
+# deconfigured's-postinst abort-deconfigure in-favour <failed-install-package> <version> [<removing conflicting-package> <version>]
+#
+# The current action is to simply remove the mistakenly-added
+# /etc/init/ceph.conf file; this could be done in any of these cases,
+# although technically it will leave the system in a different state
+# than the original install that included that file. So instead we
+# only remove on "configure", since that's the only time we know we're
+# successful in installing a newer package than the erroneous version.
+
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ configure)
+ start radosgw-all || true
+ ;;
+ abort-upgrade|abort-remove|abort-deconfigure)
+ :
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/debian/radosgw.prerm b/debian/radosgw.prerm
new file mode 100644
index 00000000000..b0b0498bd89
--- /dev/null
+++ b/debian/radosgw.prerm
@@ -0,0 +1,23 @@
+#!/bin/sh
+# vim: set noet ts=8:
+
+set -e
+
+case "$1" in
+ remove)
+ stop radosgw-all || true
+ invoke-rc.d radosgw stop || {
+ RESULT=$?
+ if [ $RESULT != 100 ]; then
+ exit $RESULT
+ fi
+ }
+ ;;
+
+ *)
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0