diff options
author | George Liu <liuxiwei@ieisystem.com> | 2024-01-25 09:00:39 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2024-01-31 02:46:00 +0300 |
commit | 9c30b993f6c4f32e8e674b979fb3f0f083760f27 (patch) | |
tree | be8a972fc48044cd0fb9b5ce0d3ac0cbf0a7ad22 | |
parent | 376c57bd5e1eebe152013aa82ce0a04896f2022b (diff) | |
download | openbmc-9c30b993f6c4f32e8e674b979fb3f0f083760f27.tar.xz |
ledmanager: Add LED_ORG_JSON_PATTERNS to filter installed json files
Since not all machines need to install all the files in the configs
directory, LED_ORG_JSON_PATTERNS is added to selectively install the
json files required by each machine. By default, the variable is
initialized to match the dbus sub-directories.
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I026e2bd8bd0efd717c79a026f97aa95f7054a335
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
-rw-r--r-- | meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb index 40f6af456a..0fda6c83cf 100644 --- a/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb +++ b/meta-phosphor/recipes-phosphor/leds/phosphor-led-manager_git.bb @@ -24,6 +24,18 @@ PACKAGECONFIG[persistent-led-asserted] = "-Dpersistent-led-asserted=enabled, \ PV = "1.0+git${SRCPV}" PR = "r1" +LED_ORG_JSON_PATTERNS ??= "${@ d.getVar('OBMC_ORG_YAML_SUBDIRS').replace('/', '.')}" +LED_CONFIG_GREP_ARGS = "${@ ''.join([ ' -e ' + x for x in d.getVar('LED_ORG_JSON_PATTERNS').split() ])}" +do_install:append() { + for f in "${D}${datadir}/${PN}/"*.json ; + do + if ! echo "$(basename $f)" | grep -q ${LED_CONFIG_GREP_ARGS}; + then + rm -f ${f} + fi + done +} + SYSTEMD_PACKAGES = "${PN} ${PN}-faultmonitor" S = "${WORKDIR}/git" SYSTEMD_SERVICE:${PN} += "obmc-led-group-start@.service obmc-led-group-stop@.service" |