fm-mgr fails on debian due to init.d differences
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Gerry Kopec |
Bug Description
Debian issue for fm-mgr and fm-api.
The init.d for fm-mgr is trying to source a file that does not exist on debian, and use a method that does not exist in the debian-equivalent for the lsb initialization.
The file needs to be updated to work on both.
Proposed fix is to modify these two files
https:/
https:/
We simply need to add a detection to the top of the file, to know if we are debian or centos
and source the appropriate file, and use the appropriate 'status' method.
Note: /lib/lsb does not exist on centos so the following code seems to work without affecting a centos env
Change this line:
. /etc/init.
to:
CENTOS_
DEBIAN_
if [ -f ${DEBIAN_FUNCTIONS} ] ; then
STATUS_
. ${DEBIAN_FUNCTIONS}
else
STATUS_
. ${CENTOS_FUNCTIONS}
fi
NOTE: this example is for fm-mgr. the status method for fm-api may be sufficient already.
change the 3 places in the fminit file (2 places in stop, one place in status) from:
status ${FMMGR_NAME} >/dev/null
to:
${STATUS_FUNC} ${FMMGR_NAME} >/dev/null
tags: | added: stx.7.0 stx.debian stx.fault |
Changed in starlingx: | |
assignee: | nobody → Gerry Kopec (gerry-kopec) |
importance: | Undecided → Medium |
The init script for fm-api should also be updated similarly:
https:/ /github. com/starlingx/ fault/blob/ master/ fm-rest- api/fm/ scripts/ fm-api