fix: Always reboot when applying boot config

Change-type: patch
Closes: #1037
Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
Cameron Diver 2019-07-22 16:07:39 +01:00
parent 430e58c932
commit e91fa6e7b3
No known key found for this signature in database
GPG Key ID: 49690ED87032539F

View File

@ -489,7 +489,13 @@ export class DeviceConfig {
});
}
if (_.isEmpty(steps) && this.rebootRequired) {
// Check if there is either no steps, or they are all
// noops, and we need to reboot. We want to do this
// because in a preloaded setting with no internet
// connection, the device will try to start containers
// before any boot config has been applied, which can
// cause problems
if (_.every(steps, { action: 'noop' }) && this.rebootRequired) {
steps.push({
action: 'reboot',
});