blob: 612139550024a4d8305b5678193538629a1babc4 [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
8pkg_postinst_${PN}-ledmanager_rainier () {
9
10 # Needed this to run as part of BMC boot
11 mkdir -p $D$systemd_system_unitdir/multi-user.target.wants
12 LINK="$D$systemd_system_unitdir/multi-user.target.wants/obmc-led-set-all-groups-asserted@false.service"
13 TARGET="../obmc-led-set-all-groups-asserted@.service"
14 ln -s $TARGET $LINK
15
16 # Needed this to run as part of Power On
17 mkdir -p $D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants
18 LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/obmc-led-set-all-groups-asserted@false.service"
19 TARGET="../obmc-led-set-all-groups-asserted@.service"
20 ln -s $TARGET $LINK
21}
22
23pkg_prerm_${PN}-ledmanager_rainier () {
24
25 LINK="$D$systemd_system_unitdir/multi-user.target.wants/obmc-led-set-all-groups-asserted@false.service"
26 rm $LINK
27
28 LINK="$D$systemd_system_unitdir/obmc-chassis-poweron@0.target.wants/obmc-led-set-all-groups-asserted@false.service"
29 rm $LINK
30}