Skip to content

Commit 0cdf3bc

Browse files
committed
debian: start ceph-mon-all and ceph-osd-all on package install
This matches ceph-mds-all and ceph-all behavior. Fixes: http://tracker.ceph.com/issues/15098 Signed-off-by: Sage Weil <sage@redhat.com>
1 parent 07c945b commit 0cdf3bc

File tree

4 files changed

+136
-0
lines changed

4 files changed

+136
-0
lines changed

debian/ceph-mon.postinst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# vim: set noet ts=8:
2+
# postinst script for ceph-mon
3+
#
4+
# see: dh_installdeb(1)
5+
6+
set -e
7+
8+
# summary of how this script can be called:
9+
#
10+
# postinst configure <most-recently-configured-version>
11+
# old-postinst abort-upgrade <new-version>
12+
# conflictor's-postinst abort-remove in-favour <package> <new-version>
13+
# postinst abort-remove
14+
# deconfigured's-postinst abort-deconfigure in-favour <failed-install-package> <version> [<removing conflicting-package> <version>]
15+
#
16+
17+
# for details, see http://www.debian.org/doc/debian-policy/ or
18+
# the debian-policy package
19+
20+
[ -f "/etc/default/ceph" ] && . /etc/default/ceph
21+
[ -z "$SERVER_USER" ] && SERVER_USER=ceph
22+
[ -z "$SERVER_GROUP" ] && SERVER_GROUP=ceph
23+
24+
case "$1" in
25+
configure)
26+
[ -x /sbin/start ] && start ceph-mon-all || :
27+
;;
28+
abort-upgrade|abort-remove|abort-deconfigure)
29+
:
30+
;;
31+
32+
*)
33+
echo "postinst called with unknown argument \`$1'" >&2
34+
exit 1
35+
;;
36+
esac
37+
38+
# dh_installdeb will replace this with shell code automatically
39+
# generated by other debhelper scripts.
40+
41+
#DEBHELPER#
42+
43+
exit 0
44+
45+

debian/ceph-mon.prerm

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
# vim: set noet ts=8:
3+
4+
set -e
5+
6+
case "$1" in
7+
remove)
8+
[ -x /sbin/stop ] && stop ceph-mon-all || true
9+
invoke-rc.d ceph stop mon || {
10+
RESULT=$?
11+
if [ $RESULT != 100 ]; then
12+
exit $RESULT
13+
fi
14+
}
15+
;;
16+
17+
*)
18+
;;
19+
esac
20+
21+
#DEBHELPER#
22+
23+
exit 0

debian/ceph-osd.postinst

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# vim: set noet ts=8:
2+
# postinst script for ceph-osd
3+
#
4+
# see: dh_installdeb(1)
5+
6+
set -e
7+
8+
# summary of how this script can be called:
9+
#
10+
# postinst configure <most-recently-configured-version>
11+
# old-postinst abort-upgrade <new-version>
12+
# conflictor's-postinst abort-remove in-favour <package> <new-version>
13+
# postinst abort-remove
14+
# deconfigured's-postinst abort-deconfigure in-favour <failed-install-package> <version> [<removing conflicting-package> <version>]
15+
#
16+
17+
# for details, see http://www.debian.org/doc/debian-policy/ or
18+
# the debian-policy package
19+
20+
[ -f "/etc/default/ceph" ] && . /etc/default/ceph
21+
[ -z "$SERVER_USER" ] && SERVER_USER=ceph
22+
[ -z "$SERVER_GROUP" ] && SERVER_GROUP=ceph
23+
24+
case "$1" in
25+
configure)
26+
[ -x /sbin/start ] && start ceph-osd-all || :
27+
;;
28+
abort-upgrade|abort-remove|abort-deconfigure)
29+
:
30+
;;
31+
32+
*)
33+
echo "postinst called with unknown argument \`$1'" >&2
34+
exit 1
35+
;;
36+
esac
37+
38+
# dh_installdeb will replace this with shell code automatically
39+
# generated by other debhelper scripts.
40+
41+
#DEBHELPER#
42+
43+
exit 0
44+
45+

debian/ceph-osd.prerm

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
# vim: set noet ts=8:
3+
4+
set -e
5+
6+
case "$1" in
7+
remove)
8+
[ -x /sbin/stop ] && stop ceph-osd-all || true
9+
invoke-rc.d ceph stop osd || {
10+
RESULT=$?
11+
if [ $RESULT != 100 ]; then
12+
exit $RESULT
13+
fi
14+
}
15+
;;
16+
17+
*)
18+
;;
19+
esac
20+
21+
#DEBHELPER#
22+
23+
exit 0

0 commit comments

Comments
 (0)