balena-supervisor: replace references to resin-vars

Replace all references to the 'resin-vars' script with
'balena-config-vars' as it has been renamed. Add a conditional
test for compatibility with legacy systems.

Change-type: patch
Changelog-entry: balena-supervisor: replace references to resin-vars
Signed-off-by: Mark Corbin <mark@balena.io>
This commit is contained in:
Mark Corbin 2021-03-31 15:01:53 +00:00
parent 10b56658e6
commit 6ca9507beb

View File

@ -2,8 +2,14 @@
# Adapted from: https://github.com/balena-os/meta-balena/blob/v2.45.0/meta-balena-common/recipes-containers/resin-supervisor/resin-supervisor/start-resin-supervisor
# We still need to include resin-vars on legacy systems
if [ -f /usr/sbin/resin-vars ]; then
# shellcheck disable=SC1091
. /usr/sbin/resin-vars
. /usr/sbin/resin-vars
else
# shellcheck disable=SC1091
. /usr/sbin/balena-config-vars
fi
if ! balena inspect $SUPERVISOR_IMAGE:$SUPERVISOR_TAG > /dev/null; then
balena load --input /usr/src/supervisor-image.tar