blob: 174d9d0a4b9e2127e133603e6e55de43e9ad5794 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SYSTEMD_SERVICE_${PN}_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}_append_rainier +="obmc/led/set-all/groups/config"
# Use the JSON configuration file at runtime than the static led.yaml
# Also, enable Lamp Test feature for rainier systems
PACKAGECONFIG_append_rainier = " use-json use-lamp-test"
pkg_postinst_${PN}_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}_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
}
|