blob: 325d8bf7f9762bef02e1c368c73a3d9f8250d989 [file] [log] [blame]
Vishwanatha Subbanna1a8345b2020-10-23 02:10:20 -05001FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
2
3SYSTEMD_SERVICE_${PN}-ledmanager_append_rainier += "obmc-led-set-all-groups-asserted@.service"
4
5# Copies config file having arguments for led-set-all-groups-asserted.sh
6SYSTEMD_ENVIRONMENT_FILE_${PN}-ledmanager_append_rainier +="obmc/led/set-all/groups/config"
7
Vishwanatha Subbanna9f410cc2021-03-23 13:52:11 +00008# Use the JSON configuration file at runtime than the static led.yaml
9PACKAGECONFIG_append_rainier = " use-json"
10
Vishwanatha Subbanna1a8345b2020-10-23 02:10:20 -050011pkg_postinst_${PN}-ledmanager_rainier () {
12
13 # Needed this to run as part of BMC boot
14 mkdir -p $D$systemd_system_unitdir/multi-user.target.wants
15 LINK="$D$systemd_system_unitdir/multi-user.target.wants/obmc-led-set-all-groups-asserted@false.service"
16 TARGET="../obmc-led-set-all-groups-asserted@.service"
17 ln -s $TARGET $LINK
18
19 # Needed this to run as part of Power On
20 mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants
21 LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/obmc-led-set-all-groups-asserted@false.service"
22 TARGET="../obmc-led-set-all-groups-asserted@.service"
23 ln -s $TARGET $LINK
24}
25
26pkg_prerm_${PN}-ledmanager_rainier () {
27
28 LINK="$D$systemd_system_unitdir/multi-user.target.wants/obmc-led-set-all-groups-asserted@false.service"
29 rm $LINK
30
31 LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/obmc-led-set-all-groups-asserted@false.service"
32 rm $LINK
33}