diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2022-03-04 20:15:25 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2022-03-07 18:06:25 +0300 |
commit | d21bfcaac24fb225c33ace6828b3d81db89c9874 (patch) | |
tree | 2425b9878851228536dc2003c707b14914eee982 /meta-facebook/meta-bletchley/recipes-phosphor | |
parent | f8a7774abd5e8650038240d45f590fb3cdc79fb3 (diff) | |
download | openbmc-d21bfcaac24fb225c33ace6828b3d81db89c9874.tar.xz |
meta-facebook: bletchley: simplify phosphor-pid-control overrides
Rather than use `sed` to inject After dependencies into the service
file, create a `service.d` config file.
Tested: Booted Bletchley in QEMU and confirmed dependency with
`systemctl list-dependencies phosphor-pid-control --after`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib8122f5ca68d514a951811f8a8984ba54b211876
Diffstat (limited to 'meta-facebook/meta-bletchley/recipes-phosphor')
-rw-r--r-- | meta-facebook/meta-bletchley/recipes-phosphor/fans/phosphor-pid-control_%.bbappend | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/fans/phosphor-pid-control_%.bbappend b/meta-facebook/meta-bletchley/recipes-phosphor/fans/phosphor-pid-control_%.bbappend index 3312ea9ee2..8d23a1cd21 100644 --- a/meta-facebook/meta-bletchley/recipes-phosphor/fans/phosphor-pid-control_%.bbappend +++ b/meta-facebook/meta-bletchley/recipes-phosphor/fans/phosphor-pid-control_%.bbappend @@ -1,16 +1,19 @@ FILESEXTRAPATHS:prepend:bletchley := "${THISDIR}/${PN}:" SRC_URI:append:bletchley = " \ - file://config.json \ - " + file://config.json \ + " FILES:${PN}:append:bletchley = " ${datadir}/swampd/config.json" +FILES:${PN}:append:bletchley = " ${systemd_system_unitdir}/phosphor-pid-control.service.d/*.conf" do_install:append:bletchley() { - # Insert service dependencies - sed -i '/^\[Unit\]/a After=xyz.openbmc_project.hwmontempsensor.service' \ - ${D}${systemd_system_unitdir}/phosphor-pid-control.service - sed -i '/^\[Unit\]/a After=phosphor-virtual-sensor.service' \ - ${D}${systemd_system_unitdir}/phosphor-pid-control.service + + override_dir="${D}${systemd_system_unitdir}/phosphor-pid-control.service.d" + override_file="${override_dir}/10-bletchley.conf" + mkdir -p ${D}${systemd_system_unitdir}/phosphor-pid-control.service.d + echo "[Unit]" > ${override_file} + echo "After=xyz.openbmc_project.hwmontempsensor.service" >> ${override_file} + echo "After=phosphor-virtual-sensor.service" >> ${override_file} install -d ${D}${datadir}/swampd install -m 0644 -D ${WORKDIR}/config.json ${D}${datadir}/swampd/ |