diff options
author | Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> | 2020-10-23 10:10:20 +0300 |
---|---|---|
committer | Andrew Geissler <geissonator@yahoo.com> | 2020-12-15 21:53:48 +0300 |
commit | 1a8345b34bb88a212c75d8188d5385ccbc6c2a3e (patch) | |
tree | c5565c45fd6a1793d8c201dc25499caeba2380d8 /meta-ibm/recipes-phosphor/leds/phosphor-led-manager_%.bbappend | |
parent | 530e1d809b87f0646b8131540d57a985b0aca527 (diff) | |
download | openbmc-1a8345b34bb88a212c75d8188d5385ccbc6c2a3e.tar.xz |
LEDS: Add systemd unit to call led-set-all-groups-asserted.sh
led-set-all-groups-asserted.sh needs to be called with "false"
as part of below transitions to turn off all indicator LEDs
- BMC booting to standby and staying at standby
- BMC starting to power on
(From meta-ibm rev: e784b71c2d625b4507758df4bb5743fc678251f3)
Change-Id: If248220964c65e91e9382504b1a7095cc5cec26b
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-ibm/recipes-phosphor/leds/phosphor-led-manager_%.bbappend')
-rw-r--r-- | meta-ibm/recipes-phosphor/leds/phosphor-led-manager_%.bbappend | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/meta-ibm/recipes-phosphor/leds/phosphor-led-manager_%.bbappend b/meta-ibm/recipes-phosphor/leds/phosphor-led-manager_%.bbappend new file mode 100644 index 0000000000..6121395500 --- /dev/null +++ b/meta-ibm/recipes-phosphor/leds/phosphor-led-manager_%.bbappend @@ -0,0 +1,30 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SYSTEMD_SERVICE_${PN}-ledmanager_append_rainier += "obmc-led-set-all-groups-asserted@.service" + +# Copies config file having arguments for led-set-all-groups-asserted.sh +SYSTEMD_ENVIRONMENT_FILE_${PN}-ledmanager_append_rainier +="obmc/led/set-all/groups/config" + +pkg_postinst_${PN}-ledmanager_rainier () { + + # Needed this to run as part of BMC boot + mkdir -p $D$systemd_system_unitdir/multi-user.target.wants + LINK="$D$systemd_system_unitdir/multi-user.target.wants/obmc-led-set-all-groups-asserted@false.service" + TARGET="../obmc-led-set-all-groups-asserted@.service" + ln -s $TARGET $LINK + + # Needed this to run as part of Power On + mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants + LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/obmc-led-set-all-groups-asserted@false.service" + TARGET="../obmc-led-set-all-groups-asserted@.service" + ln -s $TARGET $LINK +} + +pkg_prerm_${PN}-ledmanager_rainier () { + + LINK="$D$systemd_system_unitdir/multi-user.target.wants/obmc-led-set-all-groups-asserted@false.service" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/obmc-led-set-all-groups-asserted@false.service" + rm $LINK +} |