]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
debian: start ceph-mon-all and ceph-osd-all on package install 8617/head
authorSage Weil <sage@redhat.com>
Fri, 15 Apr 2016 15:46:56 +0000 (11:46 -0400)
committerSage Weil <sage@redhat.com>
Fri, 15 Apr 2016 15:46:56 +0000 (11:46 -0400)
This matches ceph-mds-all and ceph-all behavior.

Fixes: http://tracker.ceph.com/issues/15098
Signed-off-by: Sage Weil <sage@redhat.com>
debian/ceph-mon.postinst [new file with mode: 0644]
debian/ceph-mon.prerm [new file with mode: 0644]
debian/ceph-osd.postinst [new file with mode: 0644]
debian/ceph-osd.prerm [new file with mode: 0644]

diff --git a/debian/ceph-mon.postinst b/debian/ceph-mon.postinst
new file mode 100644 (file)
index 0000000..b33f34b
--- /dev/null
@@ -0,0 +1,45 @@
+# vim: set noet ts=8:
+# postinst script for ceph-mon
+#
+# 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>]
+#
+
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+[ -f "/etc/default/ceph" ] && . /etc/default/ceph
+[ -z "$SERVER_USER" ] && SERVER_USER=ceph
+[ -z "$SERVER_GROUP" ] && SERVER_GROUP=ceph
+
+case "$1" in
+    configure)
+       [ -x /sbin/start ] && start ceph-mon-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/ceph-mon.prerm b/debian/ceph-mon.prerm
new file mode 100644 (file)
index 0000000..5f64058
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+# vim: set noet ts=8:
+
+set -e
+
+case "$1" in
+    remove)
+       [ -x /sbin/stop ] && stop ceph-mon-all || true
+       invoke-rc.d ceph stop mon || {
+           RESULT=$?
+           if [ $RESULT != 100 ]; then
+               exit $RESULT
+           fi
+       }
+       ;;
+
+    *)
+       ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/ceph-osd.postinst b/debian/ceph-osd.postinst
new file mode 100644 (file)
index 0000000..b642dfe
--- /dev/null
@@ -0,0 +1,45 @@
+# vim: set noet ts=8:
+# postinst script for ceph-osd
+#
+# 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>]
+#
+
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+[ -f "/etc/default/ceph" ] && . /etc/default/ceph
+[ -z "$SERVER_USER" ] && SERVER_USER=ceph
+[ -z "$SERVER_GROUP" ] && SERVER_GROUP=ceph
+
+case "$1" in
+    configure)
+       [ -x /sbin/start ] && start ceph-osd-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/ceph-osd.prerm b/debian/ceph-osd.prerm
new file mode 100644 (file)
index 0000000..40f07b6
--- /dev/null
@@ -0,0 +1,23 @@
+#!/bin/sh
+# vim: set noet ts=8:
+
+set -e
+
+case "$1" in
+    remove)
+       [ -x /sbin/stop ] && stop ceph-osd-all || true
+       invoke-rc.d ceph stop osd || {
+           RESULT=$?
+           if [ $RESULT != 100 ]; then
+               exit $RESULT
+           fi
+       }
+       ;;
+
+    *)
+       ;;
+esac
+
+#DEBHELPER#
+
+exit 0