diff options
-rw-r--r-- | meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc | 17 |
1 files changed, 12 insertions, 5 deletions
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" |