mirror of
https://github.com/ceph/ceph
synced 2024-12-28 14:34:13 +00:00
Merge pull request #8617 from liewegas/wip-15098
debian: start ceph-mon-all and ceph-osd-all on package install … Reviewed-by: Ken Dreyer <kdreyer@redhat.com> Reviewed-by: Dan Mick <dmick@redhat.com> Tested-by: Yuri Weinstein <yweinste@redhat.com>
This commit is contained in:
commit
266cfe1879
45
debian/ceph-mon.postinst
vendored
Normal file
45
debian/ceph-mon.postinst
vendored
Normal file
@ -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
|
||||
|
||||
|
23
debian/ceph-mon.prerm
vendored
Normal file
23
debian/ceph-mon.prerm
vendored
Normal file
@ -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
|
45
debian/ceph-osd.postinst
vendored
Normal file
45
debian/ceph-osd.postinst
vendored
Normal file
@ -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
|
||||
|
||||
|
23
debian/ceph-osd.prerm
vendored
Normal file
23
debian/ceph-osd.prerm
vendored
Normal file
@ -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
|
Loading…
Reference in New Issue
Block a user