/** * Initd unit state machine labels (documentation parity with stock initd runner). */ export const BARE_OS_INITD_UNIT_STATE = Object.freeze({ INACTIVE: 'inactive', ACTIVATING: 'activating', ACTIVE: 'active', DEACTIVATING: 'deactivating', FAILED: 'failed' }) /** * @param {string} s * @returns {boolean} */ export function isKnownInitdUnitState(s) { const v = String(s || '') for (const x of Object.values(BARE_OS_INITD_UNIT_STATE)) { if (x === v) return true } return false }