diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2022-04-20 21:48:37 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2022-04-21 22:20:09 +0300 |
commit | 83a7aa99cbd4ecdf7a1724a87093c7b4150d89c6 (patch) | |
tree | 92882211290ecb367b2c4ccbde61737570684853 /meta-phosphor | |
parent | d7d3423ca60a040efcd61db301eea48c5f6635f4 (diff) | |
download | openbmc-83a7aa99cbd4ecdf7a1724a87093c7b4150d89c6.tar.xz |
phosphor-state-manager: move chassis symlinks to correct subpkg
The `multi-user.target.requires/...Chassis@{i}.service` symlinks were
being added to the `obmc-targets` sub-package, but nothing explicitly
depends on the `chassis` sub-package. On systems that do not include
the `chassis` sub-package, this results in broken symlinks.
Move these `Chassis@{i}.service` symlinks into the `chassis`
sub-package since that is where the original service file resides.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Iefc8c0bf8eb9b5f43fa67a13bf52ceb4ce55e52e
Diffstat (limited to 'meta-phosphor')
-rw-r--r-- | meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc | 25 |
1 files changed, 21 insertions, 4 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 index 3a4898b86e..aa0dc0ebf8 100644 --- a/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc +++ b/meta-phosphor/recipes-phosphor/state/phosphor-state-manager-systemd-links.inc @@ -12,10 +12,6 @@ pkg_postinst:${PN}-obmc-targets:append() { TARGET="../xyz.openbmc_project.State.Host@.service" ln -s $TARGET $LINK - LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Chassis@${i}.service" - TARGET="../xyz.openbmc_project.State.Chassis@.service" - ln -s $TARGET $LINK - LINK="$D$systemd_system_unitdir/multi-user.target.requires/obmc-host-reset@${i}.target" TARGET="../obmc-host-reset@.target" ln -s $TARGET $LINK @@ -106,6 +102,17 @@ pkg_postinst:${PN}-obmc-targets:append() { done } +pkg_postinst:${PN}-chassis:append() { + for i in ${OBMC_HOST_INSTANCES}; + do + mkdir -p $D$systemd_system_unitdir/multi-user.target.requires + + LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Chassis@${i}.service" + TARGET="../xyz.openbmc_project.State.Chassis@.service" + ln -s $TARGET $LINK + done +} + pkg_postinst:${PN}-chassis-check-power-status:append() { for i in ${OBMC_HOST_INSTANCES}; @@ -185,6 +192,16 @@ pkg_prerm:${PN}-obmc-targets:append() { done } +pkg_prerm:${PN}-chassis:append() { + for i in ${OBMC_HOST_INSTANCES}; + do + + LINK="$D$systemd_system_unitdir/multi-user.target.requires/xyz.openbmc_project.State.Chassis@${i}.service" + rm $LINK + + done +} + pkg_prerm:${PN}-chassis-check-power-status:append() { for i in ${OBMC_HOST_INSTANCES}; |