summaryrefslogtreecommitdiff
path: root/meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc')
-rw-r--r--meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc25
1 files changed, 25 insertions, 0 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
new file mode 100644
index 000000000..7b2bb59cd
--- /dev/null
+++ b/meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc
@@ -0,0 +1,25 @@
+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
+
+ LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog@0.service"
+ TARGET="../openpower-debug-collector-watchdog@.service"
+ ln -s $TARGET $LINK
+
+ LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog-timeout@0.service"
+ TARGET="../openpower-debug-collector-watchdog-timeout.service"
+ ln -s $TARGET $LINK
+}
+
+pkg_prerm_${PN}_append() {
+ LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/openpower-debug-collector-checkstop@0.service"
+ rm $LINK
+ 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"
+ rm $LINK
+}