summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-05-30 08:53:22 -0700
committerSage Weil <sage@inktank.com>2013-05-30 17:25:41 -0700
commit131dca7d10d5b0b7dca5c5cbe9b0b54938805015 (patch)
tree567e04ef42ed78d9b1c602c589483553e87c8df0
parent8b7ca687ded06fe0b67d98e81fa1dabbed440853 (diff)
downloadceph-131dca7d10d5b0b7dca5c5cbe9b0b54938805015.tar.gz
debian: sync up postinst and prerm with latest
- do not use invoke-rc.d for upstart - do not stop daemons on upgrade - misc other cleanups This corresponds to the state of master as of cf9aa7a. Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r--debian/ceph-mds.postinst1
-rw-r--r--debian/ceph-mds.prerm22
-rw-r--r--debian/ceph.postinst1
-rw-r--r--debian/ceph.prerm23
-rw-r--r--debian/radosgw.postinst49
-rw-r--r--debian/radosgw.prerm23
6 files changed, 114 insertions, 5 deletions
diff --git a/debian/ceph-mds.postinst b/debian/ceph-mds.postinst
index 7fcbf5c6230..66b3b5fc2d7 100644
--- a/debian/ceph-mds.postinst
+++ b/debian/ceph-mds.postinst
@@ -1,4 +1,5 @@
#!/bin/sh
+# vim: set noet ts=8:
# postinst script for ceph-mds
#
# see: dh_installdeb(1)
diff --git a/debian/ceph-mds.prerm b/debian/ceph-mds.prerm
index c4af0994d94..654518a7d55 100644
--- a/debian/ceph-mds.prerm
+++ b/debian/ceph-mds.prerm
@@ -1,5 +1,23 @@
#!/bin/sh
+# vim: set noet ts=8:
-[ -x /sbin/stop ] && stop ceph-mds-all || :
+set -e
-exit 0 \ No newline at end of file
+case "$1" in
+ remove)
+ [ -x /sbin/stop ] && stop ceph-mds-all || :
+ invoke-rc.d ceph stop mds || {
+ RESULT=$?
+ if [ $RESULT != 100 ]; then
+ exit $RESULT
+ fi
+ }
+ ;;
+
+ *)
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/ceph.postinst b/debian/ceph.postinst
index 090a91aa9bb..5d64f640b99 100644
--- a/debian/ceph.postinst
+++ b/debian/ceph.postinst
@@ -1,4 +1,5 @@
#!/bin/sh
+# vim: set noet ts=8:
# postinst script for ceph
#
# see: dh_installdeb(1)
diff --git a/debian/ceph.prerm b/debian/ceph.prerm
index 4aac21400a9..bfd7d3d6fb2 100644
--- a/debian/ceph.prerm
+++ b/debian/ceph.prerm
@@ -1,6 +1,23 @@
#!/bin/sh
+# vim: set noet ts=8:
-[ -x /sbin/stop ] && stop ceph-all || :
-[ -x /usr/sbin/service ] && service ceph stop || :
+set -e
-exit 0 \ No newline at end of file
+case "$1" in
+ remove)
+ [ -x /sbin/stop ] && stop ceph-all || true
+ invoke-rc.d ceph stop || {
+ RESULT=$?
+ if [ $RESULT != 100 ]; then
+ exit $RESULT
+ fi
+ }
+ ;;
+
+ *)
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/radosgw.postinst b/debian/radosgw.postinst
new file mode 100644
index 00000000000..f3468bc60bf
--- /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)
+ [ -x /sbin/start ] && start radosgw-all || :
+ ;;
+ 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..4120fb6272c
--- /dev/null
+++ b/debian/radosgw.prerm
@@ -0,0 +1,23 @@
+#!/bin/sh
+# vim: set noet ts=8:
+
+set -e
+
+case "$1" in
+ remove)
+ [ -x /sbin/stop ] && stop radosgw-all || true
+ invoke-rc.d radosgw stop || {
+ RESULT=$?
+ if [ $RESULT != 100 ]; then
+ exit $RESULT
+ fi
+ }
+ ;;
+
+ *)
+ ;;
+esac
+
+#DEBHELPER#
+
+exit 0