summaryrefslogtreecommitdiffstats
path: root/recipes-sota/aktualizr/environment.inc
blob: cba77e74f15ff1026dbf85036049b749d4c874dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
export SOTA_LEGACY_SECONDARY_INTERFACE
export SOTA_VIRTUAL_SECONDARIES

do_install_append() {
  if [ -n "${SOTA_LEGACY_SECONDARY_INTERFACE}" ]; then
    AKTUALIZR_PARAMETERS_LEGACYSEC="--legacy-interface ${SOTA_LEGACY_SECONDARY_INTERFACE}";
  fi

  AKTUALIZR_PARAMETERS_CONFIGFILE="--config /usr/lib/sota/sota.toml"
  for sec in ${SOTA_VIRTUAL_SECONDARIES}; do
    AKTUALIZR_PARAMETERS_VIRTUALSECS="${AKTUALIZR_PARAMETERS_VIRTUALSECS} --secondary-config $sec"
  done

  echo "AKTUALIZR_CMDLINE_PARAMETERS=${AKTUALIZR_PARAMETERS_CONFIGFILE} ${AKTUALIZR_PARAMETERS_LEGACYSEC} ${AKTUALIZR_PARAMETERS_VIRTUALSECS}" > ${D}${libdir}/sota/sota.env
}

FILES_${PN}_append = " ${libdir}/sota/sota.env"