X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-stx%2Frecipes-core%2Fstx-metal%2Fmtce.inc;h=2ca9ef6022432839601440190396009b42ae169d;hb=5e0fe87d85c4cb20196ec940f14c7ff9fed1276f;hp=bcc426aa380ff05e95c9798752f4e1e1d8b8f2be;hpb=b918cd2934d94a7c5afe88ba4c3de964a54368c2;p=pti%2Frtp.git diff --git a/meta-stx/recipes-core/stx-metal/mtce.inc b/meta-stx/recipes-core/stx-metal/mtce.inc index bcc426a..2ca9ef6 100644 --- a/meta-stx/recipes-core/stx-metal/mtce.inc +++ b/meta-stx/recipes-core/stx-metal/mtce.inc @@ -13,6 +13,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +MAJOR = "${@d.getVar('PV').split('.')[0]}" +MINOR = "${@d.getVar('PV').split('.')[1]}" + PACKAGES += " mtce" PACKAGES += " mtce-pmon" PACKAGES += " mtce-hwmon" @@ -42,6 +45,8 @@ do_configure_prepend () { } do_compile_prepend () { + # use sed to correct the path of systemctl + sed -i -e 's|${bindir}/systemctl|${base_bindir}/systemctl|' ${S}/mtce/src/pmon/pmonHdlr.cpp cd ${S}/mtce/src/ oe_runmake -e VER=1 VER_MJR=1 INCLUDES=" -I. -I../alarm -I../heartbeat -I../maintenance \ -I../hostw -I../public -I../smash -I../common -I../hwmon \ @@ -52,9 +57,6 @@ do_compile_prepend () { } do_install_prepend () { -# TODO: -# Really need to fix the package;s Makefile - cd ${S}/mtce/src/ install -m 755 -d ${D}/${bindir} install -m 755 -d ${D}/${sbindir} @@ -69,10 +71,10 @@ do_install_prepend () { install -m 755 -d ${D}/${sysconfdir}/pmon.d install -m 755 -d ${D}/${sysconfdir}/logrotate.d - install -m 755 -d ${D}/${sysconfdir}/serverices.d - install -m 755 -d ${D}/${sysconfdir}/serverices.d/controller - install -m 755 -d ${D}/${sysconfdir}/serverices.d/worker - install -m 755 -d ${D}/${sysconfdir}/serverices.d/storage + install -m 755 -d ${D}/${sysconfdir}/services.d + install -m 750 -d ${D}/${sysconfdir}/services.d/controller + install -m 750 -d ${D}/${sysconfdir}/services.d/worker + install -m 750 -d ${D}/${sysconfdir}/services.d/storage cd ${S}/mtce/src/ install -m 755 -p -D scripts/mtcAgent ${D}/${libdir}/ocf/resource.d/platform @@ -151,9 +153,9 @@ do_install_prepend () { install -m 755 -p -D scripts/goenabled ${D}/${sysconfdir}/init.d/goenabled # start or stop services test script - install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/serverices.d/worker - install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/serverices.d/controller - install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/serverices.d/storage + install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/services.d/worker + install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/services.d/controller + install -m 755 -p -D scripts/mtcTest ${D}/${sysconfdir}/services.d/storage install -m 755 -p -D scripts/runservices ${D}/${sysconfdir}/init.d/runservices @@ -185,9 +187,9 @@ do_install_prepend () { # software development files install -m 644 -p -D heartbeat/mtceHbsCluster.h ${D}/${includedir}/mtceHbsCluster.h - install -m 755 -p -D public/libamon.so.1 ${D}/${libdir}/ - #cd ${D}/%{_libdir} ; ln -s libamon.so.$MAJOR libamon.so.$MAJOR.$MINOR - #cd ${D}/%{_libdir} ; ln -s libamon.so.$MAJOR libamon.so + install -m 755 -p -D public/libamon.so.${MAJOR} ${D}/${libdir}/ + cd ${D}/${libdir} ; ln -s libamon.so.${MAJOR} libamon.so.${MAJOR}.${MINOR} + cd ${D}/${libdir} ; ln -s libamon.so.${MAJOR} libamon.so } SYSTEMD_PACKAGES += " \ @@ -263,7 +265,7 @@ FILES_mtce = " \ ${sbindir}/fsync \ ${sbindir}/dmemchk.sh \ ${libdir}/ocf/resource.d/platform/mtcAgent \ - ${libdir}/libamon.so.1 \ + ${libdir}/libamon${SOLIBS} \ ${systemd_system_unitdir}/mtcalarm.service \ ${systemd_system_unitdir}/goenabled.service \ ${systemd_system_unitdir}/mtclog.service \ @@ -293,9 +295,9 @@ FILES_mtce = " \ ${sysconfdir}/bmc/server_profiles.d/sensor_hp380_v1_ilo_v4.profile \ ${sysconfdir}/bmc/server_profiles.d/sensor_hp360_v1_ilo_v4.profile \ ${sysconfdir}/bmc/server_profiles.d/sensor_quanta_v1_ilo_v4.profile \ - ${sysconfdir}/serverices.d/worker/mtcTest \ - ${sysconfdir}/serverices.d/controller/mtcTest \ - ${sysconfdir}/serverices.d/storage/mtcTest \ + ${sysconfdir}/services.d/worker/mtcTest \ + ${sysconfdir}/services.d/controller/mtcTest \ + ${sysconfdir}/services.d/storage/mtcTest \ ${sysconfdir}/mtc/fsmond.conf \ ${sysconfdir}/mtc/tmp/ \ ${sysconfdir}/mtc.ini \