debian: Fix ceph lsb script

This work is part of Debian integration effort.
This work only affect Debian. We can port this to CentOS without
issues.

This prevents Maintenance check for /etc/services.d/controller/ceph.sh
from successfully completing after unlock, which results in a reboot.

Debian uses /lib/lsb/init-functions vs CentOS /etc/init.d/functions.
init-functions calls hooks from /lib/lsb/init-functions.d/.
One of the hooks redirect the lsb script call to a systemctl call.
Systemctl calls for ceph service don't work on CentOS or Debian.
There is no sourcing of /etc/init.d/functions so we don't need it for
/lib/lsb/init-functions either.

Using the reasoning above drop sourcing of /lib/lsb/init-functions.

Tests on AIO-SX:
CentOS: not affected, skip
Debian:
PASS: live patch controller, unlock, no unwanted reboot initiated by
Maintenance
PASS: build-pkgs, extract contents and check /etc/init.d/ceph

Story: 2009101
Task: 44791
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Change-Id: I49b79e78b0f832096dca98ca2cfd68c454679b95
This commit is contained in:
Dan Voiculeasa 2022-03-16 14:27:27 +02:00
parent eb22f6c2a8
commit 5bcfd552de

View File

@ -12,11 +12,6 @@
# Description: Enable Ceph distributed file system services.
### END INIT INFO
# TODO: on FreeBSD/OSX, use equivalent script file
if [ -e /lib/lsb/init-functions ]; then
. /lib/lsb/init-functions
fi
if [ `dirname $0` = "." ] && [ $PWD != "/etc/init.d" ]; then
# looks like an autotools src dir build
BINDIR=.