diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-09-01 09:39:03 +0200 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-09-01 17:27:07 +0200 |
| commit | e94f0e47d742f3c8f228bf21907954008ade7ba0 (patch) | |
| tree | 39f38d1f51e0d5325a39ea9ea81cd65ba5554a7e /scripts/cli | |
| parent | 6d2523edeed89e0d968df13b7ec656de5bbd2952 (diff) | |
| download | vyos-1x-e94f0e47d742f3c8f228bf21907954008ade7ba0.tar.gz vyos-1x-e94f0e47d742f3c8f228bf21907954008ade7ba0.zip | |
image: T9269: skip GRUB updates on container and diskless systems
Kernel cmdline and serial console updates rewrite the GRUB configuration on
the persistence partition. A container has no GRUB at all, and on a system
where the persistence partition is not mounted disk.find_persistence()
returns an empty string, so the code reads '//boot/grub/grub.cfg' and dies
with FileNotFoundError.
Extend is_running_as_container() to also honor /run/.containerenv (Podman)
and the container= variable systemd sets for PID 1, and add if_not_container()
plus if_persistence() decorators guarding all grub_util entry points.
Diffstat (limited to 'scripts/cli')
0 files changed, 0 insertions, 0 deletions
