~tribaal/ubuntu/trusty/ceph/ceph-zap-in-two-phases

« back to all changes in this revision

Viewing changes to debian/ceph.postinst

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-05-19 21:04:18 UTC
  • Revision ID: package-import@ubuntu.com-20130519210418-053rk70dzn5z0a6r
Tags: 0.61.2-0ubuntu2
* Fix ceph-test package:
  - d/ceph-test.install: Add missing install file.
  - d/rules: Enable --with-debug option to build test executables.
  - d/p/fix_test_ftbfs.patch: Fix format-security errors.
* Fix rbd-fuse package:
  - d/rbd-fuse.install: Add missing install file.
* d/ceph.install: Include missing udev rule for ceph-osd disks.
* d/rules: Drop --with-system-leveldb as this is now the default.
* d/control,rules: Review and further re-sync with upstream packaging.
* d/ceph.{postinst,prerm}: start/stop ceph-all upstart configuration
  if upstart is in use.
* d/ceph-mds.{postinst,prerm}: start/stop ceph-mds-all upstart configuration
  if upstart is in use.
* d/p/python_rados_cluster_stat.patch: Dropped - included upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
# vim: set noet ts=8:
 
3
# postinst script for ceph
 
4
#
 
5
# see: dh_installdeb(1)
 
6
 
 
7
set -e
 
8
 
 
9
# summary of how this script can be called:
 
10
#
 
11
#       postinst configure <most-recently-configured-version>
 
12
#       old-postinst abort-upgrade <new-version>
 
13
#       conflictor's-postinst abort-remove in-favour <package> <new-version>
 
14
#       postinst abort-remove
 
15
#       deconfigured's-postinst abort-deconfigure in-favour <failed-install-package> <version> [<removing conflicting-package> <version>]
 
16
#
 
17
# The current action is to simply remove the mistakenly-added
 
18
# /etc/init/ceph.conf file; this could be done in any of these cases,
 
19
# although technically it will leave the system in a different state
 
20
# than the original install that included that file.  So instead we
 
21
# only remove on "configure", since that's the only time we know we're
 
22
# successful in installing a newer package than the erroneous version.
 
23
 
 
24
# for details, see http://www.debian.org/doc/debian-policy/ or
 
25
# the debian-policy package
 
26
 
 
27
 
 
28
case "$1" in
 
29
    configure)
 
30
        rm -f /etc/init/ceph.conf
 
31
        invoke-rc.d ceph-all start || {
 
32
                RESULT=$?
 
33
                # Ignore if ceph-all upstart config does not
 
34
                # exist or upstart is not in use
 
35
                if [ $RESULT != 100 ]; then
 
36
                        exit $RESULT
 
37
                fi
 
38
        }
 
39
    ;;
 
40
    abort-upgrade|abort-remove|abort-deconfigure)
 
41
        :
 
42
    ;;
 
43
 
 
44
    *)
 
45
        echo "postinst called with unknown argument \`$1'" >&2
 
46
        exit 1
 
47
    ;;
 
48
esac
 
49
 
 
50
# dh_installdeb will replace this with shell code automatically
 
51
# generated by other debhelper scripts.
 
52
 
 
53
#DEBHELPER#
 
54
 
 
55
exit 0
 
56
 
 
57