mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-06-02 13:59:59 +00:00
opensaf: Make sure a file needed by opensafd.service is not removed
Rename /etc/init.d/opensafd to /usr/lib/opensaf/opensafd-init as it is needed by opensafd.service, but /etc/init.d is removed by systemd.bbclass if sysvinit is not in DISTRO_FEATURES. Note that this will not actually make the initscript and service file work since they depend on /lib/lsb/init-functions, which does not exist since the lsb recipe was removed from OE-Core. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
committed by
Khem Raj
parent
b402a3076f
commit
fce137d50b
@@ -60,10 +60,14 @@ do_install:append() {
|
|||||||
rmdir "${D}${localstatedir}/log"
|
rmdir "${D}${localstatedir}/log"
|
||||||
rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
|
rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
|
||||||
rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
|
rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
|
||||||
if [ ! -d "${D}${sysconfdir}/init.d" ]; then
|
|
||||||
install -d ${D}${sysconfdir}/init.d
|
# Rename /etc/init.d/opensafd to /usr/lib/opensaf/opensafd-init as it is
|
||||||
install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
|
# needed by opensafd.service, but /etc/init.d is removed by systemd.bbclass
|
||||||
fi
|
# if sysvinit is not in DISTRO_FEATURES.
|
||||||
|
mv ${D}${sysconfdir}/init.d/opensafd ${D}${libdir}/${BPN}/opensafd-init
|
||||||
|
ln -srf ${D}${libdir}/${BPN}/opensafd-init ${D}${sysconfdir}/init.d/opensafd
|
||||||
|
[ ! -f ${D}${systemd_system_unitdir}/opensafd.service ] ||
|
||||||
|
sed -ri -e "s|/etc/init.d/opensafd|${libdir}/${BPN}/opensafd-init|" ${D}${systemd_system_unitdir}/opensafd.service
|
||||||
|
|
||||||
# Create /var/log/opensaf/saflog in runtime.
|
# Create /var/log/opensaf/saflog in runtime.
|
||||||
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
|
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user