diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
---|---|---|
committer | Jason M. Bills <jason.m.bills@linux.intel.com> | 2020-12-08 00:38:17 +0300 |
commit | 8d6ae7f2a817751fad151168fa10ce28ee0869d8 (patch) | |
tree | 281032f7ec07c41589aa094bd165cc2a98f2d3a7 /meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc | |
parent | c16fb8893b19075db4bcf3b5bf33c1db8c3ca2bd (diff) | |
parent | 5da3c2284560a7e08ffafd03c5b5ba44a3242228 (diff) | |
download | openbmc-8d6ae7f2a817751fad151168fa10ce28ee0869d8.tar.xz |
Merge tag '0.26' of ssh://git-amr-1.devtools.intel.com:29418/openbmc-openbmc into update
Diffstat (limited to 'meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc')
-rw-r--r-- | meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc | 142 |
1 files changed, 142 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc new file mode 100644 index 000000000..6c12da8c4 --- /dev/null +++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc @@ -0,0 +1,142 @@ +pkg_postinst_${PN}-obmc-targets_append() { + + mkdir -p $D$systemd_system_unitdir/multi-user.target.requires + LINK="$D$systemd_system_unitdir/multi-user.target.requires/obmc-host-reset@0.target" + TARGET="../obmc-host-reset@.target" + ln -s $TARGET $LINK + + LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-discover-system-state@0.service" + TARGET="../phosphor-discover-system-state@.service" + ln -s $TARGET $LINK + + mkdir -p $D$systemd_system_unitdir/obmc-host-start@0.target.requires + LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/obmc-host-startmin@0.target" + TARGET="../obmc-host-startmin@.target" + ln -s $TARGET $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phosphor-reset-host-reboot-attempts@0.service" + TARGET="../phosphor-reset-host-reboot-attempts@.service" + ln -s $TARGET $LINK + + mkdir -p $D$systemd_system_unitdir/obmc-host-reset@0.target.requires + LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-check@0.service" + TARGET="../phosphor-reset-host-check@.service" + ln -s $TARGET $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-sensor-states@0.service" + TARGET="../phosphor-reset-sensor-states@.service" + ln -s $TARGET $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service" + TARGET="../phosphor-reset-host-running@.service" + ln -s $TARGET $LINK + + mkdir -p $D$systemd_system_unitdir/obmc-host-stop@0.target.wants + LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service" + TARGET="../phosphor-reset-sensor-states@.service" + ln -s $TARGET $LINK + + mkdir -p $D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants + LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service" + TARGET="../phosphor-reset-sensor-states@.service" + ln -s $TARGET $LINK + + mkdir -p $D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires + LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target" + TARGET="../obmc-chassis-poweroff@.target" + ln -s $TARGET $LINK + + mkdir -p $D$systemd_system_unitdir/obmc-host-reboot@0.target.requires + LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target" + TARGET="../obmc-host-shutdown@.target" + ln -s $TARGET $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service" + TARGET="../phosphor-reboot-host@.service" + ln -s $TARGET $LINK + + mkdir -p $D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires + LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" + TARGET="../xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" + ln -s $TARGET $LINK + + mkdir -p $D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires + LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target" + TARGET="../obmc-host-stop@.target" + ln -s $TARGET $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service" + TARGET="../phosphor-reboot-host@.service" + ln -s $TARGET $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target" + TARGET="../obmc-host-force-warm-reboot@.target" + ln -s $TARGET $LINK + + mkdir -p $D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires + LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/obmc-host-force-warm-reboot@0.target" + TARGET="../obmc-host-force-warm-reboot@.target" + ln -s $TARGET $LINK + + mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants + LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service" + TARGET="../phosphor-clear-one-time@.service" + ln -s $TARGET $LINK +} + +pkg_prerm_${PN}-obmc-targets_append() { + + LINK="$D$systemd_system_unitdir/multi-user.target.requires/obmc-host-reset@0.target" + rm $LINK + + LINK="$D$systemd_system_unitdir/multi-user.target.requires/phosphor-discover-system-state@0.service" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/obmc-host-startmin@0.target" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phosphor-reset-host-reboot-attempts@0.service" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-check@0.service" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-sensor-states@0.service" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-stop@0.target.wants/phosphor-reset-sensor-states@0.service" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-quiesce@0.target.wants/phosphor-reset-sensor-states@0.service" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-reset@0.target.requires/phosphor-reset-host-running@0.service" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/obmc-chassis-poweroff@0.target" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/obmc-host-shutdown@0.target" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-reboot@0.target.requires/phosphor-reboot-host@0.service" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/xyz.openbmc_project.Ipmi.Internal.SoftPowerOff.service" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/obmc-host-stop@0.target" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-force-warm-reboot@0.target.requires/phosphor-reboot-host@0.service" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/obmc-host-force-warm-reboot@0.target" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/obmc-host-force-warm-reboot@0.target" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.wants/phosphor-clear-one-time@0.service" + rm $LINK +} |