summaryrefslogtreecommitdiff
path: root/meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc
diff options
context:
space:
mode:
authorAndrew Geissler <geissonator@yahoo.com>2021-02-02 01:17:23 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2021-02-04 21:30:45 +0300
commitee12600186bed70bba59fbf0b8d9651093bdbdc0 (patch)
tree62df6fba5f478eb236a0f4dee3b08c25dfb4b221 /meta-openpower/recipes-phosphor/debug/openpower-debug-collector-systemd-links.inc
parentaa25e2c3f2a771666db1cff98633a2b834b422c8 (diff)
downloadopenbmc-ee12600186bed70bba59fbf0b8d9651093bdbdc0.tar.xz
mpreboot: separate out systemd target work
The OpenBMC community has been moving away from the use of the SYSTEMD_LINK macro and going towards more explicit commands to create the needed wants/requires relationships for systemd. This commit does that in preparation for some other work in this area utilizing the new mpreboot distro feature. No functional changes were done with this commit. Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I01086e51400cf94498c62d9bc6cbcc75813b20f6
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 0000000000..7b2bb59cd3
--- /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
+}