diff --git a/src/device-state/index.ts b/src/device-state/index.ts index 149b3b9b..327cd27f 100644 --- a/src/device-state/index.ts +++ b/src/device-state/index.ts @@ -455,6 +455,7 @@ export async function shutdown({ // Get current apps to create locks for const apps = await applicationManager.getCurrentApps(); const appIds = Object.keys(apps).map((strId) => parseInt(strId, 10)); + const lockOverride = await config.get('lockOverride'); // Try to create a lock for all the services before shutting down return updateLock.withLock( appIds, @@ -474,7 +475,7 @@ export async function shutdown({ emitAsync('shutdown', undefined); return dbusAction; }, - { force }, + { force: force || lockOverride }, ); } diff --git a/src/host-config/index.ts b/src/host-config/index.ts index 23a39200..e56f36da 100644 --- a/src/host-config/index.ts +++ b/src/host-config/index.ts @@ -103,6 +103,7 @@ export async function patch( const { noProxy, ...targetConf } = conf.network.proxy; // It's possible for appIds to be an empty array, but patch shouldn't fail // as it's not dependent on there being any running user applications. + const lockOverride = await config.get('lockOverride'); return updateLock.withLock( appIds, async () => { @@ -124,7 +125,7 @@ export async function patch( ); await setProxy(patchedConf, noProxy); }, - { force }, + { force: force || lockOverride }, ); } }