blob: 37ae3fb42f7edef06162f9f38e3c5352360b3548 [file] [log] [blame]
Adriana Kobylak8c6707f2021-08-06 17:35:36 +00001pkg_postinst:${PN}:append() {
Andrew Geissleree126002021-02-01 16:17:23 -06002 mkdir -p $D$systemd_system_unitdir/obmc-host-crash@0.target.wants
3 mkdir -p $D$systemd_system_unitdir/obmc-host-timeout@0.target.wants
4
Andrew Geissler13140542021-02-01 16:26:18 -06005 # The obmc-host-crash target is repurposed for the memory preserving reboot
6 # feature when it is enabled. If not enabled, then install the standard
7 # debug collector checkstop service for basic error reporting
8 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'mpreboot', d)}" != mpreboot ]; then
9 LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/openpower-debug-collector-checkstop@0.service"
10 TARGET="../openpower-debug-collector-checkstop@.service"
11 ln -s $TARGET $LINK
12 fi
Andrew Geissleree126002021-02-01 16:17:23 -060013
14 LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog@0.service"
15 TARGET="../openpower-debug-collector-watchdog@.service"
16 ln -s $TARGET $LINK
17
Patrick Williams8c561ee2021-10-22 14:20:12 -050018 if [ "${@bb.utils.filter('MACHINE_FEATURES', 'phal', d)}" != 'phal' ]; then
Shantappa Teekappanavar2ffa05e2021-08-31 17:49:10 -050019 LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog-timeout@0.service"
20 TARGET="../openpower-debug-collector-watchdog-timeout@.service"
21 ln -s $TARGET $LINK
22 fi
Andrew Geissleree126002021-02-01 16:17:23 -060023}
24
Dhruvaraj Subhashchandran26fb25b2022-01-18 07:07:18 -060025pkg_postinst:${PN}:append:p10bmc() {
26 mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants
27
28 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/clear_hostdumps_poweroff.service"
29 TARGET="../clear_hostdumps_poweroff.service"
30 ln -s $TARGET $LINK
31}
32
Adriana Kobylak8c6707f2021-08-06 17:35:36 +000033pkg_prerm:${PN}:append() {
Andrew Geissler13140542021-02-01 16:26:18 -060034 if [ "${@bb.utils.filter('DISTRO_FEATURES', 'mpreboot', d)}" != mpreboot ]; then
35 LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/openpower-debug-collector-checkstop@0.service"
36 rm $LINK
37 fi
Andrew Geissleree126002021-02-01 16:17:23 -060038 LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog@0.service"
39 rm $LINK
Patrick Williams8c561ee2021-10-22 14:20:12 -050040 if [ "${@bb.utils.filter('MACHINE_FEATURES', 'phal', d)}" != 'phal' ]; then
Shantappa Teekappanavar2ffa05e2021-08-31 17:49:10 -050041 LINK="$D$systemd_system_unitdir/obmc-host-timeout@0.target.wants/openpower-debug-collector-watchdog-timeout@0.service"
42 rm $LINK
43 fi
Andrew Geissleree126002021-02-01 16:17:23 -060044}
Dhruvaraj Subhashchandran26fb25b2022-01-18 07:07:18 -060045
46pkg_prerm:${PN}:append:p10bmc() {
47 LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/clear_hostdumps_poweroff.service"
48 rm $LINK
49}