snapcore / core-initrd

initrd implementation in ubuntu core
https://ubuntu.com/core/docs
GNU General Public License v3.0
9 stars 27 forks source link

factory: handle properly snapd_recovery_mode based on modeenv value #214

Closed kubiko closed 10 months ago

kubiko commented 10 months ago

The real source of true for the current mode is stored in /var/lib/snapd/modeenvthis value might be altered after /usr/lib/systemd/system-generators/journald-console was already run. Or /var/lib/snapd/modeenv did not even exist at that time. This happens in install/factory-reset/recovery modes which might be handled within the initrd. If this is detected, update journald-console generator and remove already created journald.conf.d/core-override.conf config overlay.

kubiko commented 10 months ago

Redone as per @xnox suggestion

alfonsosanchezbeato commented 10 months ago

See comment in https://github.com/snapcore/core-initrd/pull/213

xnox commented 10 months ago

Newer series must be merged first.