From 1314054a7f06a0c11677833323eca06eb4826b6e Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Mon, 1 Feb 2021 16:26:18 -0600 Subject: mpreboot: do not install service if mpreboot enabled When mpreboot is enabled, there is a more advanced form of diagnostic and recovery put into the obmc-host-crash@.target. In this case we do not want the basic error reported by the service within this repo. Tested: - Verified correct services installed for mpreboot on Rainier and Tacoma machines - Verified non-mpreboot services installed on Witherspoon machine Signed-off-by: Andrew Geissler Change-Id: If29ad7a83c1e1551a7eb319179eca504e9f93678 --- .../debug/openpower-debug-collector-systemd-links.inc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'meta-openpower') diff --git a/meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc b/meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc index 7b2bb59cd..a3b729ec7 100644 --- a/meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc +++ b/meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc @@ -2,9 +2,14 @@ pkg_postinst_${PN}_append() { mkdir -p $D$systemd_system_unitdir/obmc-host-crash@0.target.wants mkdir -p $D$systemd_system_unitdir/obmc-host-timeout@0.target.wants - LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/openpower-debug-collector-checkstop@0.service" - TARGET="../openpower-debug-collector-checkstop@.service" - ln -s $TARGET $LINK + # The obmc-host-crash target is repurposed for the memory preserving reboot + # feature when it is enabled. If not enabled, then install the standard + # debug collector checkstop service for basic error reporting + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'mpreboot', d)}" != mpreboot ]; then + LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/openpower-debug-collector-checkstop@0.service" + TARGET="../openpower-debug-collector-checkstop@.service" + ln -s $TARGET $LINK + fi LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog@0.service" TARGET="../openpower-debug-collector-watchdog@.service" @@ -16,8 +21,10 @@ pkg_postinst_${PN}_append() { } pkg_prerm_${PN}_append() { - LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/openpower-debug-collector-checkstop@0.service" - rm $LINK + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'mpreboot', d)}" != mpreboot ]; then + LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/openpower-debug-collector-checkstop@0.service" + rm $LINK + fi LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog@0.service" rm $LINK LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog-timeout@0.service" -- cgit v1.2.3