diff options
author | Sage Weil <sage@inktank.com> | 2013-04-29 17:01:55 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-05-02 09:26:03 -0700 |
commit | d0678a062a1baf738ce96114114d99495be19478 (patch) | |
tree | 6351c38ad7959cbad4e1aad57e6a6a8ce3771f82 | |
parent | 209ce34a420cc5cdbe7219393f2f150ac28f612c (diff) | |
download | ceph-d0678a062a1baf738ce96114114d99495be19478.tar.gz |
debian: only start/stop upstart jobs if upstart is present
This avoids errors on non-upstart distros (like wheezy).
Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit 030bf8aaa15837f898e453161eeaf1d52fc5779d)
Conflicts:
debian/ceph-mds.postinst
-rw-r--r-- | debian/ceph-mds.postinst | 42 | ||||
-rw-r--r-- | debian/ceph-mds.prerm | 2 | ||||
-rw-r--r-- | debian/ceph.postinst | 2 | ||||
-rw-r--r-- | debian/ceph.prerm | 2 |
4 files changed, 45 insertions, 3 deletions
diff --git a/debian/ceph-mds.postinst b/debian/ceph-mds.postinst new file mode 100644 index 00000000000..7fcbf5c6230 --- /dev/null +++ b/debian/ceph-mds.postinst @@ -0,0 +1,42 @@ +#!/bin/sh +# postinst script for ceph-mds +# +# 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 + + +case "$1" in + configure) + [ -x /sbin/start ] && start ceph-mds-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-mds.prerm b/debian/ceph-mds.prerm index 56d9e0128f1..c4af0994d94 100644 --- a/debian/ceph-mds.prerm +++ b/debian/ceph-mds.prerm @@ -1,5 +1,5 @@ #!/bin/sh -stop ceph-mds-all || : +[ -x /sbin/stop ] && stop ceph-mds-all || : exit 0
\ No newline at end of file diff --git a/debian/ceph.postinst b/debian/ceph.postinst index 4edbf10d93b..090a91aa9bb 100644 --- a/debian/ceph.postinst +++ b/debian/ceph.postinst @@ -27,7 +27,7 @@ set -e case "$1" in configure) rm -f /etc/init/ceph.conf - start ceph-all || : + [ -x /sbin/start ] && start ceph-all || : ;; abort-upgrade|abort-remove|abort-deconfigure) : diff --git a/debian/ceph.prerm b/debian/ceph.prerm index 159a96e33c3..557a1dbdac0 100644 --- a/debian/ceph.prerm +++ b/debian/ceph.prerm @@ -1,5 +1,5 @@ #!/bin/sh -stop ceph-all || : +[ -x /sbin/stop ] && stop ceph-all || : exit 0
\ No newline at end of file |