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
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 dec6153..5cff105 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 @@
 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 @@
     ;;
 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