mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-23 23:42:29 +00:00
Use root mount point to find device-type.json
Change-type: patch Signed-off-by: Cameron Diver <cameron@balena.io>
This commit is contained in:
parent
8ae2b4a5cd
commit
9d19a45701
@ -45,7 +45,7 @@ export const fnSchema = {
|
||||
// FIXME: We should be mounting the following file into the supervisor from the
|
||||
// start-resin-supervisor script, changed in meta-resin - but until then, hardcode it
|
||||
const data = await fs.readFile(
|
||||
`${constants.bootMountPoint}/device-type.json`,
|
||||
`${constants.rootMountPoint}${constants.bootMountPoint}/device-type.json`,
|
||||
'utf8',
|
||||
);
|
||||
const deviceInfo = JSON.parse(data);
|
||||
@ -64,7 +64,7 @@ export const fnSchema = {
|
||||
// FIXME: We should be mounting the following file into the supervisor from the
|
||||
// start-resin-supervisor script, changed in meta-resin - but until then, hardcode it
|
||||
const data = await fs.readFile(
|
||||
`${constants.bootMountPoint}/device-type.json`,
|
||||
`${constants.rootMountPoint}${constants.bootMountPoint}/device-type.json`,
|
||||
'utf8',
|
||||
);
|
||||
const deviceInfo = JSON.parse(data);
|
||||
|
@ -151,7 +151,7 @@ describe('Config', () => {
|
||||
expect(deviceArch).to.equal(arch);
|
||||
expect(fs.readFile).to.be.calledOnce;
|
||||
expect(fs.readFile).to.be.calledWith(
|
||||
`${constants.bootMountPoint}/device-type.json`,
|
||||
`${constants.rootMountPoint}${constants.bootMountPoint}/device-type.json`,
|
||||
'utf8',
|
||||
);
|
||||
|
||||
@ -171,7 +171,7 @@ describe('Config', () => {
|
||||
expect(deviceType).to.equal(slug);
|
||||
expect(fs.readFile).to.be.calledOnce;
|
||||
expect(fs.readFile).to.be.calledWith(
|
||||
`${constants.bootMountPoint}/device-type.json`,
|
||||
`${constants.rootMountPoint}${constants.bootMountPoint}/device-type.json`,
|
||||
'utf8',
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user