From 583ce34c01d310d41c243d8a12f2851fae9d91ac Mon Sep 17 00:00:00 2001 From: Pablo Carranza Velez Date: Thu, 18 Oct 2018 12:04:38 +0200 Subject: [PATCH] apiBinder: Keep prepending RESIN_ to reported config variables Signed-off-by: Pablo Carranza Velez --- src/api-binder.coffee | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api-binder.coffee b/src/api-binder.coffee index 542f4af8..ef1e2444 100644 --- a/src/api-binder.coffee +++ b/src/api-binder.coffee @@ -324,13 +324,15 @@ module.exports = class APIBinder targetConfig = targetState.local.config Promise.mapSeries _.toPairs(currentConfig), ([ key, value ]) => # We never want to disable VPN if, for instance, it failed to start so far - if key == 'RESIN_SUPERVISOR_VPN_CONTROL' + if key == 'SUPERVISOR_VPN_CONTROL' value = 'true' if !targetConfig[key]? and value != defaultConfig[key] + # At some point the namespace in the API should change to BALENA_ + # but for now we only have RESIN_ envVar = { value device: deviceId - name: key + name: 'RESIN_' + key } @resinApi.post resource: 'device_config_variable'