mirror of
https://github.com/ceph/ceph
synced 2024-12-25 21:03:31 +00:00
eaaf80725c
These were previously missing. The requirement for interpreters is in Debian policy section 10.4: https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts Debian's packaging already adds the #! to these two postinsts. In practice, a text executible without a #! line will likely be executed by the calling shell, so a lot of the time we'd get away with it unless the administrator is using an incompatible shell like tcsh. This behaviour of shells is documented in POSIX section 1(e)(i)(b) here: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_01_01 Signed-off-by: Matthew Vernon <mvernon@wikimedia.org>
48 lines
1.1 KiB
Bash
48 lines
1.1 KiB
Bash
#!/bin/sh
|
|
# 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 /etc/init.d/procps ] && invoke-rc.d procps restart || :
|
|
[ -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
|
|
|
|
|