Closed kubiko closed 10 months ago
Redone as per @xnox suggestion
We would need a PR for main
@alfonsosanchezbeato I have tested this on the system with compressed install steps and it does behave there as expected. So generator is re-run before root pivot
@alfonsosanchezbeato I have tested this on the system with compressed install steps and it does behave there as expected. So generator is re-run before root pivot
Right, because at some point there is some daemon-reload happening iirc. But that is a bit of an accident I'd say, and even more, that means that journal will stop to be sent to console while we have not switched root yet. Maybe the file could be removed in a ExecStopPost=
stanza inside itself. A bit strange as the file would be removing itself, but I think that is fine as that information is kept in memory I think.
@kubiko it is confusing to submit multiple PRs of the same to all series whilst review comments then spread across all of them.
Also i agree with review comments here.
Please land changes in main branch first, ahead of backporting. The code proposed here is now different to what has landed in main branch. Please fix main branch first.
The real source of true for the current mode is stored in
/var/lib/snapd/modeenv
this 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 ininstall
/factory-reset
/recovery
modes which might be handled within the initrd. If this is detected, updatejournald-console
generator and remove already createdjournald.conf.d/core-override.conf
config overlay.