mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-23 23:42:29 +00:00
Auto-merge for PR #585 via VersionBot
DeviceConfig: avoid trying to enable or disable the VPN when in offline mode
This commit is contained in:
commit
44e5778acc
@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
|
||||
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## v7.1.11 - 2018-03-14
|
||||
|
||||
* DeviceConfig: avoid trying to enable or disable the VPN when in offline mode #585 [Pablo Carranza Velez]
|
||||
|
||||
## v7.1.10 - 2018-03-14
|
||||
|
||||
* ApplicationManager: try to match available images by imageId to avoid keeping around unused image entries in the db #584 [Pablo Carranza Velez]
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "resin-supervisor",
|
||||
"description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.",
|
||||
"version": "7.1.10",
|
||||
"version": "7.1.11",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -148,8 +148,8 @@ module.exports = class DeviceConfig
|
||||
current = _.clone(currentState.local?.config ? {})
|
||||
target = _.clone(targetState.local?.config ? {})
|
||||
steps = []
|
||||
@config.get('deviceType')
|
||||
.then (deviceType) =>
|
||||
@config.getMany([ 'deviceType', 'offlineMode' ])
|
||||
.then ({ deviceType, offlineMode }) =>
|
||||
configChanges = {}
|
||||
humanReadableConfigChanges = {}
|
||||
match = {
|
||||
@ -178,11 +178,13 @@ module.exports = class DeviceConfig
|
||||
action: 'setLogToDisplay'
|
||||
target: target['RESIN_HOST_LOG_TO_DISPLAY']
|
||||
})
|
||||
if !_.isEmpty(target['RESIN_SUPERVISOR_VPN_CONTROL']) && checkTruthy(current['RESIN_SUPERVISOR_VPN_CONTROL']) != checkTruthy(target['RESIN_SUPERVISOR_VPN_CONTROL'])
|
||||
steps.push({
|
||||
action: 'setVPNEnabled'
|
||||
target: target['RESIN_SUPERVISOR_VPN_CONTROL']
|
||||
})
|
||||
if !checkTruthy(offlineMode) &&
|
||||
!_.isEmpty(target['RESIN_SUPERVISOR_VPN_CONTROL']) &&
|
||||
checkTruthy(current['RESIN_SUPERVISOR_VPN_CONTROL']) != checkTruthy(target['RESIN_SUPERVISOR_VPN_CONTROL'])
|
||||
steps.push({
|
||||
action: 'setVPNEnabled'
|
||||
target: target['RESIN_SUPERVISOR_VPN_CONTROL']
|
||||
})
|
||||
if @bootConfigChangeRequired(deviceType, current, target)
|
||||
steps.push({
|
||||
action: 'setBootConfig'
|
||||
|
Loading…
Reference in New Issue
Block a user