Auto-merge for PR #663 via VersionBot

Add support for changing config.txt on balena fin devices
This commit is contained in:
resin-io-versionbot[bot] 2018-05-18 18:17:37 +00:00 committed by GitHub
commit 37267f62c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -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.7.0 - 2018-05-18
* Add support for changing config.txt on balena fin devices #663 [Pablo Carranza Velez]
## v7.6.0 - 2018-05-16
* Change intialConfigReported value to be an api endpoint #657 [Cameron Diver]

View File

@ -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.6.0",
"version": "7.7.0",
"license": "Apache-2.0",
"repository": {
"type": "git",

View File

@ -36,6 +36,9 @@ arrayConfigKeys = [ 'dtparam', 'dtoverlay', 'device_tree_param', 'device_tree_ov
vpnServiceName = 'openvpn-resin'
isRPiDeviceType = (deviceType) ->
_.startsWith(deviceType, 'raspberry') or deviceType == 'fincm3'
module.exports = class DeviceConfig
constructor: ({ @db, @config, @logger }) ->
@rebootRequired = false
@ -216,7 +219,7 @@ module.exports = class DeviceConfig
getBootConfig: (deviceType) =>
Promise.try =>
if !_.startsWith(deviceType, 'raspberry')
if !isRPiDeviceType(deviceType)
return {}
@readBootConfig()
.then (configTxt) =>
@ -239,7 +242,7 @@ module.exports = class DeviceConfig
setBootConfig: (deviceType, target) =>
Promise.try =>
conf = @envToBootConfig(target)
if !_.startsWith(deviceType, 'raspberry')
if !isRPiDeviceType(deviceType)
return false
@logger.logSystemMessage("Applying boot config: #{JSON.stringify(conf)}", {}, 'Apply boot config in progress')
configStatements = []