summaryrefslogtreecommitdiff
path: root/meta-facebook/meta-bletchley
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2023-02-09 23:21:51 +0300
committerPatrick Williams <patrick@stwcx.xyz>2023-02-10 06:32:17 +0300
commitddaffb3f38875d89fe0c92eb440cf495060a52f0 (patch)
treeb3da9b6e82eb43ec8fd658cbe6bc2e475ee19bd9 /meta-facebook/meta-bletchley
parent95bbe56c081d17c44b45fb61c6da9d585ae17a64 (diff)
downloadopenbmc-ddaffb3f38875d89fe0c92eb440cf495060a52f0.tar.xz
meta-facebook: bletchley: board-type-checker: use /var/lib for sensor config
phosphor-virtual-sensors now supports loading the config json from a `/var/lib` as high precedence over `/usr/share` and since `/var` is a writable file system, we should prefer this location for adding the config symlink. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Idfddd091e126b812ac68bbd06acc626ee137e437
Diffstat (limited to 'meta-facebook/meta-bletchley')
-rw-r--r--meta-facebook/meta-bletchley/recipes-bletchley/board-type-checker/files/board-type-checker-fpb6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/board-type-checker/files/board-type-checker-fpb b/meta-facebook/meta-bletchley/recipes-bletchley/board-type-checker/files/board-type-checker-fpb
index dec6153ab0..5cff1053d2 100644
--- a/meta-facebook/meta-bletchley/recipes-bletchley/board-type-checker/files/board-type-checker-fpb
+++ b/meta-facebook/meta-bletchley/recipes-bletchley/board-type-checker/files/board-type-checker-fpb
@@ -26,7 +26,7 @@ set_frontpanel_model()
I2C_BUS=10
DEV_ADDR=0x40
-VIRT_SNR_CONF="/usr/share/phosphor-virtual-sensor/virtual_sensor_config.json"
+VIRT_SNR_CONF="/var/lib/phosphor-virtual-sensor/virtual_sensor_config.json"
HDC1080_VIRT_SNR_CONF="/usr/share/phosphor-virtual-sensor/virtual_sensor_config_hdc1080.json"
SI7021_VIRT_SNR_CONF="/usr/share/phosphor-virtual-sensor/virtual_sensor_config_si7021.json"
@@ -53,6 +53,10 @@ case "$CHIP_TYPE" in
;;
esac
+if [ ! -d "$(dirname $VIRT_SNR_CONF)" ]; then
+ mkdir -p "$(dirname $VIRT_SNR_CONF)"
+fi
+
if [ ! -e "$VIRT_SNR_CONF" ]; then
ln -s "$REQUIRED_CONF_PATH" "$VIRT_SNR_CONF"
else